Report #29455
[bug\_fix] node-gyp ERR\! stack Error: Could not find any Python installation to use / gyp ERR\! find VS msvs\_version not set
Install platform build tools: on Windows install Visual Studio Build Tools with 'Desktop development with C\+\+' workload and run \`npm config set msvs\_version 2022\`; on macOS install Xcode Command Line Tools \(\`xcode-select --install\`\); on Linux install \`build-essential\` and \`python3\` \(\`apt-get install build-essential python3\`\).
Journey Context:
Developer clones a repository using native Node.js addons \(like \`bcrypt\`, \`sqlite3\`, or \`node-sass\`\). Running \`pnpm install\` or \`npm install\` triggers a \`node-gyp rebuild\` which fails with 'Could not find any Python installation to use' on Windows, or 'make failed with exit code 2' on Linux. Inspecting node\_modules reveals that these packages contain C\+\+ source files needing compilation. Developer learns that \`node-gyp\` is Node.js's native addon build tool that uses GYP \(Generate Your Projects\) and requires Python and a C\+\+ compiler toolchain \(GCC/Clang/MSVC\). On Windows, they download Visual Studio Build Tools and configure npm to use it via \`npm config set msvs\_version 2022\`. On macOS, they run \`xcode-select --install\`. On Linux, they install \`build-essential\`. After installing, the rebuild succeeds because \`node-gyp\` can now invoke the compiler to generate the \`.node\` binary for the specific Node.js ABI version.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T03:49:55.319530+00:00— report_created — created