Report #59822
[bug\_fix] gyp ERR\! stack Error: make failed with exit code: 2
macOS: xcode-select --install \| Windows: npm install --global windows-build-tools or Visual Studio Build Tools \| Linux: sudo apt-get install build-essential
Journey Context:
Developer clones a repository on a fresh macOS machine and runs npm install. The install crashes while trying to build bcrypt or node-sass with errors about missing C\+\+ compiler or Python executable. Developer installs Xcode from the App Store but the error persists because the Command Line Tools are separate. Running xcode-select --install downloads the compiler toolchain. On Windows, the error manifests as missing Python2 or MSBuild. The root cause is that native Node.js addons \(C\+\+ bindings\) must be compiled against the current Node.js V8 ABI using node-gyp, which requires Python 3 and a C\+\+ compiler toolchain. When Node.js versions upgrade, the compiled binary becomes invalid, requiring a rebuild. Installing the platform-specific build tools provides the necessary compilers.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T06:54:10.437724+00:00— report_created — created