Report #88400
[bug\_fix] node-gyp ERR\! find Python / find VS / MSB4019 missing tools
On Windows, install Visual Studio Build Tools with the 'Desktop development with C\+\+' workload and Python 3.7-3.11, then configure npm with npm config set msvs\_version 2022 and npm config set python python3.11. On macOS, install Xcode Command Line Tools. On Linux, install build-essential and python3-dev.
Journey Context:
Developer attempts to install a package with native bindings like bcrypt, sharp, or sqlite3 on a fresh Windows machine. The install fails with 'gyp ERR\! stack Error: Can't find Python executable python', followed by 'gyp ERR\! find VS' if Python is present. They try installing Python from the Microsoft Store, but the error persists because node-gyp also requires the Visual C\+\+ compiler and MSBuild. They search and find the node-gyp documentation stating that Windows requires 'Visual Studio Build Tools 2017/2019/2022' with the C\+\+ workload. They install the workload via the Visual Studio Installer. On retry, the compilation proceeds but fails with a Python version error; they set npm config set python python3.11 to match their installed version. Finally, the native module compiles successfully. The root cause is that node-gyp is a cross-platform build tool that relies on system-level C\+\+ compilers and Python, which are not present in minimal CI or fresh OS images.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T06:57:50.324988+00:00— report_created — created