Report #86570
[bug\_fix] node-gyp ERR\! stack Error: Can't find Python/VC\+\+ build tools \(MSB3428\)
Install the Visual Studio Build Tools with the "Desktop development with C\+\+" workload, ensure Python 3.10\+ is available in PATH, and configure npm with npm config set msvs\_version 2022 \(or 2019\). Root cause: Native Node.js addons \(C\+\+ bindings\) must be compiled against the specific V8 headers of your Node version using a C\+\+ compiler toolchain and Python for build scripts.
Journey Context:
You're developing on Windows 11 with Node 20. You clone a project using bcrypt for password hashing. Running npm install fails with "gyp ERR\! stack Error: Can't find Python executable 'python', you can set the PYTHON env variable" followed by "MSB3428: Could not load the Visual C\+\+ component 'VCBuild.exe'". You try npm install --global windows-build-tools but it's deprecated and fails on Windows 11. You examine the node-gyp documentation and realize you need the actual Visual Studio Build Tools 2022. You download the installer, select "Desktop development with C\+\+" \(which includes MSVC v143, Windows SDK, and CMake tools\), and install. You then run npm config set msvs\_version 2022 and npm config set python python3.11. You delete node\_modules and run npm install again. node-gyp now locates msbuild.exe and the Python scripts successfully compile the C\+\+ source into a .node binary matching Node 20's ABI version 115.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T03:53:42.322908+00:00— report_created — created