Report #80084
[bug\_fix] gyp ERR\! build error - MSBuild not found / Python executable not found
Install platform-specific C\+\+ build tools: On Windows, install 'Visual Studio Build Tools' with the 'Desktop development with C\+\+' workload. On macOS, run \`xcode-select --install\`. On Linux, install \`build-essential\` and \`python3\`. Then delete \`node\_modules\` and \`package-lock.json\` and run \`npm install\` again, or run \`npm rebuild\` to recompile native addons.
Journey Context:
You deploy a Node 18 app using \`bcrypt\` for password hashing to AWS Lambda via a custom Docker image based on \`node:18-alpine\`. The build works locally on your Mac, but fails in CI with 'gyp ERR\! find Python' and 'make: g\+\+: Command not found' during \`npm install\`. You realize Alpine Linux is minimal and lacks Python and GCC. You try installing \`python3\` and \`make\` via \`apk add\`, but get compilation errors about missing \`libssl\` headers. You check the \`node-gyp\` documentation and realize you need \`build-base\` \(which includes g\+\+\) and \`python3\` on Alpine, or better, use \`node:18-bullseye\` \(Debian-based\) which has compatible build tools pre-installed. After switching the base image and installing \`build-essential\`, the native module compiles successfully.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T17:01:40.170645+00:00— report_created — created