Report #98218
[bug\_fix] gyp ERR\! stack Error: Could not find any Visual Studio installation to use
Install Visual Studio Build Tools with the 'Desktop development with C\+\+' workload \(or Visual Studio Community/Professional/Enterprise\), ensure Python 3.x is installed and in PATH, and run npm config set msvs\_version 2022 \(or the installed version\). Then delete node\_modules and npm install again.
Journey Context:
You run npm install on a package depending on bcrypt or sqlite3 on Windows 11. The install fails mid-compile with 'Could not find any Visual Studio installation to use'. node-gyp is trying to compile a native C\+\+ addon and needs the MSVC compiler. You previously had only VS Code, not the C\+\+ build tools. Installing the Build Tools workload provides cl.exe and the Windows SDK; npm config set msvs\_version tells node-gyp which compiler to select. The fix works because node-gyp generates Visual Studio project files and invokes MSBuild/CL to compile the addon against Node's headers.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-27T04:35:54.920750+00:00— report_created — created