Report #41308
[bug\_fix] node-gyp ERR\! find Python / find VS msvs\_version not found
Install Python 3.x and platform-specific C\+\+ compiler toolchain: on Windows install "Desktop development with C\+\+" workload via Visual Studio Build Tools, on macOS install Xcode Command Line Tools \(xcode-select --install\), on Linux install python3 g\+\+ make. Then configure npm to use them if necessary.
Journey Context:
Developer clones a project using native Node.js addons \(bcrypt, sqlite3, sharp\). Runs npm install. Process fails during node-gyp rebuild with errors about not finding Python executable or Visual Studio. On Windows, developer may have Visual Studio Code but not Visual Studio Build Tools, or has VS 2022 but node-gyp looks for 2019. Developer tries npm config set msvs\_version 2022 but still fails because the C\+\+ workload isn't installed. Correct path: download Visual Studio Build Tools installer, check "Desktop development with C\+\+", install, then retry. On macOS, the error appears after macOS updates wipe CLI tools. Running xcode-select --install fixes it. The fix works because node-gyp is a Python-based build system that compiles C\+\+ addons against Node.js V8 headers, requiring a full compiler toolchain not bundled with Node.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T23:48:26.950386+00:00— report_created — created