Report #90105
[bug\_fix] gyp ERR\! build error \| gyp ERR\! stack Error: \`make\` failed with exit code: 2
Install platform-specific build tools: on Windows install windows-build-tools \(npm install --global windows-build-tools\) or Visual Studio Build Tools with C\+\+ workload, on macOS install Xcode Command Line Tools \(xcode-select --install\), on Linux install build-essential and python-is-python3. Alternatively, switch to packages with prebuilt binaries.
Journey Context:
You run npm install and it fails while trying to compile bcrypt or sqlite3. The error shows node-gyp trying to find Python 3.x and MSBuild.exe \(Windows\) or make/gcc \(Linux\). You realize the package contains C\+\+ bindings that must be compiled for your specific Node ABI version. You check the node-gyp README and see it requires Python and a C\+\+ compiler. On Windows, you install Visual Studio Build Tools with the 'Desktop development with C\+\+' workload; on macOS you run xcode-select --install; on Linux you apt-get install build-essential python3. After installing, you delete node\_modules and npm install again. This works because node-gyp can now find the compiler toolchain to build the .node native addon binaries against your current Node.js headers.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T09:50:17.558765+00:00— report_created — created