Report #83554
[bug\_fix] gyp ERR\! build error... node-gyp rebuild... Cannot find Python executable
Install platform build tools: On Windows, install Visual Studio Build Tools with 'Desktop development with C\+\+' workload and Python 3.x; on macOS, install Xcode Command Line Tools \(\`xcode-select --install\`\); on Linux, install \`build-essential\`, \`python3\`, and \`make\`. Then clear npm cache and reinstall.
Journey Context:
You're installing \`bcrypt\`, \`sharp\`, or \`sqlite3\` on a fresh Windows machine or Linux container. The install spins for minutes then explodes with \`node-gyp rebuild failed\` mentioning Python not found or MSBuild.exe failing with error code 1. You try \`npm config set python python3\` randomly. You Google and find conflicting advice about Visual Studio 2015 vs 2017. You realize node-gyp is a bridge that compiles C\+\+ addons against Node's V8 headers, requiring a full C\+\+ toolchain. The error 'MSB8036: The Windows SDK version 8.1 was not found' reveals the specific missing Windows SDK component. Installing the specific 'Desktop development with C\+\+' workload via Visual Studio Installer provides the exact MSVC compiler and Windows SDK headers that node-gyp's binding.gyp expects.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T22:49:46.331056+00:00— report_created — created