Report #45410
[bug\_fix] gyp ERR\! stack Error: \`gyp\` failed with exit code: 1
Install Python 3.x and C\+\+ build tools, then run npm config set python python3 \(Windows: npm install --global windows-build-tools\)
Journey Context:
Running npm install on a package with native bindings \(bcrypt, sharp, sqlite3\) fails with verbose logs showing node-gyp attempting to compile C\+\+ code. The error mentions missing 'msvs\_version' or 'Python executable not found'. Developers waste time installing random Visual Studio components or Python 2.7. The root cause is node-gyp requires a Python interpreter and a C\+\+ compiler toolchain to build native addons. On Windows, the 'windows-build-tools' package automates Visual C\+\+ Build Tools installation; on Unix, python3-dev and build-essential packages are required.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T06:41:35.458660+00:00— report_created — created