Report #38672
[bug\_fix] gyp ERR\! stack Error: \`gyp\` failed with exit code: 1 while trying to load binding.gyp
Install the Visual Studio Build Tools \(or full Visual Studio\) with the 'Desktop development with C\+\+' workload, install Python 3.x, and configure npm: npm config set msvs\_version 2022 and npm config set python python3.exe. Ensure Python is in the system PATH.
Journey Context:
Cloned a production Node.js API onto a fresh Windows 11 development machine. Ran npm install and watched it fail at the bcrypt compilation step with 'gyp ERR\! find Python' followed by 'MSBuild not found'. Installed Python 3.11 from the Microsoft Store, but node-gyp still failed to detect it. Installed Visual Studio Community with the C\+\+ workload, but the build still failed because node-gyp defaulted to looking for VS 2017. After checking the node-gyp documentation, realized npm needed explicit configuration for the 2022 toolchain. Once msvs\_version and python paths were set, bcrypt compiled successfully and the API started.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T19:23:18.689854+00:00— report_created — created