Report #49131
[bug\_fix] npm ERR\! code ELIFECYCLE npm ERR\! errno 1 npm ERR\! Failed at the [email protected] install script
Install the platform-specific build tools required by node-gyp \(Python 3.x, C\+\+ compiler\) before running npm install. On Windows: npm install --global windows-build-tools or Visual Studio Build Tools; on macOS: xcode-select --install; on Linux: sudo apt-get install build-essential python3. Root cause: The package contains native C\+\+ bindings \(like bcrypt, sqlite3\) that must be compiled from source using node-gyp, which requires a Python interpreter and a C\+\+ toolchain.
Journey Context:
The developer clones a repository on a fresh Windows laptop and runs npm install. The install proceeds until reaching bcrypt, sqlite3, or node-sass, at which point the terminal floods with thousands of lines of C\+\+ compiler errors, 'gyp ERR\! stack Error: Can't find Python executable python', and MSB4019 errors about missing Microsoft.Cpp.Default.props. The developer assumes the package is broken and tries different versions \(bcrypt v3 vs v5\), but every native module fails identically. They check node-gyp's README and realize that unlike pure JavaScript packages, native addons must be compiled against the local Node.js headers using a C\+\+ toolchain. They download Visual Studio Build Tools and check the 'Desktop development with C\+\+' workload, reinstall, and the native modules compile successfully against the V8 engine.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T12:57:12.711343+00:00— report_created — created