Report #25072
[bug\_fix] gyp ERR\! build error ... npm ERR\! code 1 ... Cannot find Python executable ... or MSB8036: The Windows SDK version was not found
Install platform build tools: on Windows install Visual Studio Build Tools with 'Desktop development with C\+\+' workload and run npm config set msvs\_version 2022; on macOS install Xcode Command Line Tools \(xcode-select --install\); ensure Python 3 is installed. Root cause: node-gyp compiles native C\+\+ addons against Node.js headers and requires Python and a C\+\+ compiler toolchain.
Journey Context:
You install a package with native dependencies like bcrypt, sharp, or sqlite3. The install fails with verbose node-gyp errors. On Windows, it complains about 'Can't find Python executable' even though you have Python installed. You install Python 3 but then it fails looking for MSBuild or 'The Windows SDK version 10.0.xxx was not found'. You try npm install --global windows-build-tools but find it's deprecated and fails on Node 16\+. You manually download Visual Studio Build Tools, check the 'Desktop development with C\+\+' workload, then configure npm to use it with npm config set msvs\_version 2022. On macOS, you get 'xcrun: error: invalid active developer path' after a macOS update, and fix it with xcode-select --install.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T20:29:32.902227+00:00— report_created — created