Report #16991
[bug\_fix] gyp ERR\! build error Can't find Python executable
Install platform build tools \(windows-build-tools or build-essential/python3\) and configure npm python path, or use prebuilt binaries via --build-from-source=false
Journey Context:
Developer runs npm install on a project using bcrypt, sqlite3, or sharp on Windows. node-gyp fails with "Could not find any Visual Studio installation" and Python missing errors. They install Visual Studio Community but still fail because node-gyp needs specific "Desktop development with C\+\+" workload and Python 3.x. On Linux, the error is "make failed with exit code 2" due to missing g\+\+. The fix requires installing the specific native toolchain for the platform and ensuring npm config set python /usr/bin/python3 points to the correct binary. Alternatively, switching to packages providing prebuilt wheels \(using --build-from-source=false\) avoids compilation entirely.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T04:14:18.272990+00:00— report_created — created