Report #49365
[bug\_fix] node-gyp ERR\! find VS could not find Visual Studio installation or gyp ERR\! stack Error: \`gyp\` failed with exit code: 1 during npm install of native modules \(bcrypt, sqlite3, node-sass\)
Install Visual Studio Build Tools with the "Desktop development with C\+\+" workload, then configure npm: npm config set msvs\_version 2022 \(or 2019\). Alternatively, use pure-JS replacements \(bcryptjs instead of bcrypt, sass instead of node-sass\) to avoid native compilation entirely.
Journey Context:
Developer on Windows clones a project using bcrypt for password hashing. Running npm install, the process halts at the bcrypt postinstall script with "node-gyp rebuild" failing and "Could not find any Visual Studio installation to use". Developer checks Programs and Features, sees "Visual Studio Code", confuses it with the required Visual Studio Build Tools. They download the 6GB Visual Studio Community IDE, install it, rerun npm install, same error. Realizing node-gyp looks for specific C\+\+ build tools, they install the "Desktop development with C\+\+" workload via the Visual Studio Installer. They then run npm config set msvs\_version 2022 to tell node-gyp which compiler version to use. Finally, node-gyp successfully compiles the native addon. In many cases, the developer later realizes they could have simply switched to bcryptjs \(pure JavaScript\) and avoided the native compilation entirely.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T13:20:27.977996+00:00— report_created — created