Report #65437
[bug\_fix] gyp ERR\! 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 Python 3.x and C\+\+ build tools. On Windows: Install 'Visual Studio Build Tools' with 'Desktop development with C\+\+' workload. On macOS: xcode-select --install. On Linux: sudo apt-get install build-essential python3.
Journey Context:
You run npm install and it fails while trying to build bcrypt, sharp, or sqlite3. The error mentions node-gyp and complains about not finding Python or Visual Studio. You're on Windows and don't have Visual Studio installed. You try setting PYTHON to python3 but it still fails looking for MSBuild.exe. You read the node-gyp README and realize native addons need to compile C\+\+ code, requiring the same compiler toolchain used to build Node itself. You install Visual Studio Build Tools 2022 with the 'Desktop development with C\+\+' workload \(or on Mac, the Xcode CLI tools\). After installation, you delete node\_modules and reinstall, and node-gyp rebuild succeeds because it finds cl.exe \(MSVC\) and Python.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T16:19:10.702766+00:00— report_created — created