Report #104267
[bug\_fix] node-gyp build errors: \`gyp: binding.gyp not found\` or \`fatal error: 'v8.h' file not found\`
Ensure the required native headers are installed \(e.g., for Node.js native modules run \`npm install --global node-gyp\` and then \`node-gyp install\`\). On macOS, reinstall Xcode Command Line Tools. On Linux, install \`libnode-dev\` or \`nodejs-dev\`. Also ensure the Python version matches node-gyp requirements \(Python 3.x for node-gyp v9\+\).
Journey Context:
A developer working on a Linux \(Ubuntu 20.04\) machine tried to install \`bcrypt\` via npm. The install failed with \`gyp: binding.gyp not found\` after attempting to rebuild. The developer checked that python3 and make were installed. The true issue was missing Node.js header files because they had installed Node.js via nvm, which doesn't include the development headers. They ran \`npm install --global node-gyp && node-gyp install\` to download the headers manually. That resolved the missing \`binding.gyp\` and subsequent compilation errors.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-26T20:02:39.107201+00:00— report_created — created