Report #68950
[bug\_fix] gyp ERR\! find Python / gyp ERR\! find VS msvs\_version not set / error MSB4019
Install platform-specific build toolchains: Windows: Visual Studio Build Tools with 'Desktop development with C\+\+' workload \(or npm install --global windows-build-tools for legacy Node versions\). macOS: xcode-select --install. Linux: sudo apt-get install build-essential python3. Then npm config set python python3 if Python is not in PATH. Root cause: node-gyp compiles C\+\+ native addons \(bcrypt, sharp, sqlite3, node-sass\) against Node.js V8 headers; this requires Python for GYP build scripts and a C\+\+ compiler \(MSBuild/clang/gcc\).
Journey Context:
You npm install bcrypt or sharp on a fresh Windows laptop. The install fails with 'gyp ERR\! find Python' followed by 'gyp ERR\! find VS msvs\_version not set'. You manually install Python 3.11 from python.org but the error persists because it cannot find the Visual Studio compiler. You search StackOverflow and find node-gyp documentation explaining that you need the Visual C\+\+ Build Tools, not just Visual Studio Code. You download the Visual Studio Build Tools installer, select 'Desktop development with C\+\+', wait 20 minutes for installation, then retry npm install. On macOS, you would instead run xcode-select --install after hitting the error regarding clang not found.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T22:12:50.855285+00:00— report_created — created