Report #53697
[bug\_fix] gyp ERR\! find Python / gyp ERR\! find VS / node-gyp rebuild failed
On Windows: Install 'Desktop development with C\+\+' workload from Visual Studio Build Tools 2019/2022 \(not just VS Code\), or use npm install --global windows-build-tools \(deprecated but functional on older systems\). On macOS: Install Xcode Command Line Tools \(xcode-select --install\). On Linux: Install build-essential, python3, make, gcc. Then run npm rebuild or npm install. Root cause: Native C\+\+ addons require compilation against Node.js headers using node-gyp, which requires Python and a C\+\+ compiler toolchain.
Journey Context:
Developer clones a project using bcrypt, sqlite3, or sharp on a fresh Windows machine. npm install fails with verbose logs showing 'gyp ERR\! stack Error: Can't find Python executable' or 'MSB4019: The imported project ... was not found'. Developer installs Python from python.org, adds it to PATH, still fails. Realizes it needs Visual Studio, installs VS Community, still fails. Discovers it specifically needs 'Desktop development with C\+\+' workload, not just the IDE. After installing that and setting npm config set msvs\_version 2022, the rebuild succeeds.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T20:37:37.698049+00:00— report_created — created