Report #15369
[bug\_fix] gyp ERR\! find Python / gyp ERR\! find VS / msbuild failed
Install Python 3.x and Visual Studio Build Tools with the "Desktop development with C\+\+" workload, then run npm config set msvs\_version 2022 \(or 2019\). Alternatively, switch to a prebuilt Docker image if available for the package.
Journey Context:
Developer on Windows clones a repository containing bcrypt, sqlite3, or node-sass. Runs npm install. The install fails during the postinstall script with gyp ERR\! find Python. Developer installs Python 3 from python.org and adds it to PATH. Runs npm install again. Now it fails with gyp ERR\! find VS, indicating it cannot find the Visual Studio compiler. Developer installs Visual Studio Community but doesn't select C\+\+ workload. Retries, still fails. After researching node-gyp documentation, realizes the "Desktop development with C\+\+" workload is required for the C\+\+ compiler and headers. Installs that, then runs npm config set msvs\_version 2022 to tell node-gyp which version to use. Finally, npm install succeeds as the native addon compiles.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T23:52:00.472994+00:00— report_created — created