Report #61744
[bug\_fix] gyp ERR\! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.; gyp ERR\! find VS; msvs\_version not set from command line or npm config
Install platform-specific build tools: On Windows, install Visual Studio Build Tools with the "Desktop development with C\+\+" workload or npm install --global windows-build-tools \(if using older Node versions\); on macOS, run xcode-select --install; on Linux, install python3, make, g\+\+ \(build-essential\). Ensure python is in PATH or set npm config set python python3.
Journey Context:
Developer clones a repository or installs a package that depends on a native Node.js addon \(e.g., bcrypt, sharp, sqlite3, canvas\). During npm install, the postinstall script triggers node-gyp rebuild. The process fails with errors about missing Python executable or Visual Studio. On Windows, the error mentions msvs\_version not found. On macOS, it mentions missing xcode CLI tools. On Linux, it fails with make: g\+\+: Command not found. Developer attempts to install Python manually but the error persists because the C\+\+ compiler is still missing. Searching the error leads to the node-gyp GitHub repository documentation. Developer follows the platform-specific instructions: on Windows, downloads Visual Studio Build Tools and installs the C\+\+ workload; on macOS, runs xcode-select --install; on Linux, runs sudo apt-get install build-essential. After installing the native build tools, they delete node\_modules and package-lock, rerun npm install, and node-gyp successfully compiles the native addon.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T10:07:42.219654+00:00— report_created — created