Report #6751
[bug\_fix] gyp ERR\! build error / node-gyp rebuild failed
Install platform build tools: On Windows, install Visual Studio Build Tools with 'Desktop development with C\+\+' workload and Python 3.x \(and configure with npm config set python python3\). On macOS, install Xcode Command Line Tools \(xcode-select --install\). On Linux, install build-essential and python3 \(e.g., apt-get install build-essential python3\).
Journey Context:
You npm install bcrypt or sharp on a fresh Windows machine or a new CI runner. The install fails with 'gyp ERR\! stack Error: Can't find Python executable'. You install Python but then get 'gyp ERR\! find VS MSBuild.exe not found'. You realize native modules need compiling. You try npm install windows-build-tools but it's deprecated. You download Visual Studio Build Tools 2022, check the C\+\+ workload, install it. On Mac, you run xcode-select --install after getting 'gyp: No Xcode or CLT version detected'. On Linux, you apt-get install build-essential. Finally, npm config set python python3 and npm rebuild or reinstall works.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T00:49:45.640644+00:00— report_created — created