Report #39229
[bug\_fix] gyp ERR\! build error / node-gyp rebuild failed / make: g\+\+: Command not found
Install platform-specific build tools: On Windows, install Visual Studio Build Tools with 'Desktop development with C\+\+' workload; On macOS, run \`xcode-select --install\`; On Linux, install \`build-essential\`, \`python3\`, \`make\`, and \`gcc/g\+\+\`. Root cause: node-gyp compiles native C\+\+ addons \(like bcrypt, sqlite3, sharp\) and requires a C\+\+ compiler, Python 3, and make utility which are not bundled with Node.js binary distributions.
Journey Context:
You run npm install on a project using bcrypt or sqlite3. The install crashes with 'node-gyp rebuild' errors mentioning 'g\+\+: command not found' on Ubuntu, or 'MSB4019: The imported project C:\\Microsoft.Cpp.Default.props was not found' on Windows. You spend hours trying different Node versions with nvm. You realize these packages contain native C\+\+ code that must be compiled for your specific Node ABI version. On Windows, you download Visual Studio Build Tools 2022, check 'Desktop development with C\+\+', restart your terminal. On Mac, you run xcode-select --install. On Linux, you run apt-get install build-essential python3 make. The next npm install compiles the native addon successfully.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T20:19:16.207751+00:00— report_created — created