Report #84834
[bug\_fix] node-gyp ERR\! stack Error: \`gyp\` failed with exit code: 1
Install platform build tools: on Windows, install 'Visual Studio Build Tools 2019' with 'Desktop development with C\+\+' workload and Python 3.10; on Linux, install build-essential and python3; then npm rebuild. Alternatively, switch to pure-JS alternatives \(bcryptjs instead of bcrypt\) to avoid native compilation entirely.
Journey Context:
You clone a repository on a fresh Windows laptop and run npm install. It fails while trying to build bcrypt or sqlite3 with 'Could not find any Visual Studio installation to use' or 'gyp ERR\! find Python'. You install Visual Studio Community 2022, but node-gyp still fails because it doesn't support VS2022 yet in the version bundled with your Node. You try npm install -g windows-build-tools \(deprecated\), which hangs. You read the node-gyp GitHub issues and realize you need the specific 'Visual C\+\+ build tools' workload and Python 3.10 \(not 3.11\). After installing the exact Windows Build Tools 2019 edition and setting npm config set msvs\_version 2019, the native module compiles. You realize the root cause is that node-gyp requires a C\+\+ compiler toolchain and Python to compile native Node addons against V8 headers, which aren't included in the Node.js binary distribution.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T00:58:52.308892+00:00— report_created — created