npm install Error: `node-gyp` rebuild failed (Missing Python / C++ Build Tools)

Native C++ addon lacked a prebuilt binary for the Node version or ARM64 CPU.

Runs locally in browser Free · No login Independently Verified 2026-11-25 v4.1.0
Identifier: npm install Error Platform: Node.js
Common Root Causes:
  • Native C++ addon lacked a prebuilt binary for the Node version or ARM64 CPU.

Interactive Diagnostic Checklist

Verified Solutions:
  1. Install `build-essential python3` or switch to an LTS Node version with prebuilt N-API binaries.
Safe Diagnostic Command:
node -v && uname -m && which python3 g++ make
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.

Technical Explanation

Native C++ addon lacked a prebuilt binary for the Node version or ARM64 CPU. Recommended diagnostic: `node -v && uname -m && which python3 g++ make`. Remediation: Install `build-essential python3` or switch to an LTS Node version with prebuilt N-API binaries.

Worked Examples

  • Run `node -v && uname -m && which python3 g++ make` to verify root cause before applying the remediation.

Limitations & Assumptions

  • Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.

Source References & Verification

Resource ID: err-npm-gyp-node-addon-build-fail · Independently verified: 2026-11-25

Related Resources