Report #94650
[bug\_fix] gyp ERR\! stack Error: gyp failed with exit code: 1
Install the native build toolchain: on Windows install 'Desktop development with C\+\+' workload from Visual Studio Build Tools and Python 3.x; on macOS install Xcode Command Line Tools \(\`xcode-select --install\`\); on Linux install \`python3\`, \`make\`, and \`g\+\+\` \(build-essential\). Then \`npm rebuild\` or reinstall. Root cause: Packages with native C\+\+ addons \(like bcrypt, sqlite3, sharp\) must be compiled against Node.js headers using node-gyp, which requires Python and a C\+\+ compiler.
Journey Context:
You clone a project and run \`npm install\`. It fails on a package like \`bcrypt\` or \`node-sass\` with verbose logs showing \`node-gyp rebuild\` failing, mentioning \`MSBuild.exe\` not found \(Windows\) or \`make\` failed \(Linux\) or \`xcodebuild\` missing \(macOS\). You realize these are native modules requiring compilation. On Windows, you download Visual Studio Build Tools and check the "Desktop development with C\+\+" workload, ensuring Python 3 is in PATH. On macOS, you run \`xcode-select --install\`. After installing the toolchain, you delete node\_modules and reinstall. The native module now compiles successfully against your Node.js version.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T17:27:13.306078+00:00— report_created — created