Report #49116
[bug\_fix] gyp ERR\! stack Error: not found: make or gyp ERR\! stack Error: Can't find Python executable "python"
Install platform-specific native build tools: On Windows, install windows-build-tools npm package or Visual Studio Build Tools with 'Desktop development with C\+\+' workload; on macOS, install Xcode Command Line Tools \(xcode-select --install\); on Linux, install build-essential and python3. Root cause: node-gyp requires Python 3.x and a C\+\+ compiler \(make/gcc/clang or MSBuild\) to compile native addon modules from C\+\+ source.
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. 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:55:22.126050+00:00— report_created — created