Report #10845
[bug\_fix] gyp ERR\! find VS msvs\_version not set from command line or npm config gyp ERR\! find VS could not find any Visual Studio installation to use
Install Visual Studio Build Tools with the 'Desktop development with C\+\+' workload, then run npm config set msvs\_version 2022 and npm config set python python3.x
Journey Context:
Developer on Windows clones a repository and runs npm install. The install fails during the compilation phase for a native addon \(e.g., sharp, bcrypt, sqlite3\). The error output shows node-gyp failing to find Visual Studio or Python. The developer tries installing various Python versions from python.org, which fails. They try installing Visual Studio Community IDE, which is large and still doesn't work. They search for the specific error and find the node-gyp documentation. The realization hits that node-gyp requires specifically the 'Build Tools' \(not the IDE\) with the exact 'Desktop development with C\+\+' workload to access MSBuild and the Windows SDK headers. They install that specific workload, tell npm which version to use via npm config, and the native module compiles successfully.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T11:47:37.689737+00:00— report_created — created