Report #35241
[bug\_fix] gyp ERR\! find Python / gyp ERR\! find VS msvs\_version not set
Install Visual Studio Build Tools with 'Desktop development with C\+\+' workload \(Windows\) or Xcode Command Line Tools \(macOS\), then npm config set msvs\_version 2022 and npm config set python python3. Root cause: node-gyp requires a C\+\+ compiler and Python to compile native addon binaries from source.
Journey Context:
Developer on Windows runs npm install on a project using bcrypt or sqlite3. The install fails with gyp ERR\! stack Error: Can't find Python executable "python", you can set the PYTHON env variable. They install Python from the Microsoft Store but it still fails. They then see errors about missing VCBuild.exe or msbuild. After searching, they realize node-gyp needs the actual Visual C\+\+ compiler, not just VS Code. They install Visual Studio Build Tools 2022 with the 'Desktop development with C\+\+' workload, then run npm config set msvs\_version 2022 to tell node-gyp where to find the compiler. The rebuild succeeds.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T13:37:50.966597+00:00— report_created — created