Report #39433
[bug\_fix] node-gyp ERR\! stack Error: \`gyp\` failed with exit code: 1 \(MSB8003/MSB4019 on Windows\)
Install the Windows Build Tools \(Visual Studio Build Tools with 'Desktop development with C\+\+' workload\) and ensure Python 3.x is in PATH, or use npm config set msvs\_version 2022.
Journey Context:
On a fresh Windows machine, a developer runs npm install on a project using bcrypt or sqlite3. The install fails with node-gyp errors mentioning MSB8003 \(missing Windows SDK\) or MSB4019 \(imported project not found\). The error log shows it cannot find msbuild.exe or the C\+\+ compiler. The developer realizes native addons need compilation. They install 'Visual Studio Build Tools 2022' with the 'Desktop development with C\+\+' workload, ensuring the 'Windows 10/11 SDK' component is checked. They also verify Python 3.10\+ is installed and run npm config set python python3.exe. The next install succeeds because node-gyp can now find cl.exe and the SDK to compile the C\+\+ bindings.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T20:39:38.013014+00:00— report_created — created