Report #38239
[bug\_fix] node-pre-gyp WARN Pre-built binaries not found \(404\) for target
Install a Node.js version that has prebuilt binaries available for the package \(check the package's release notes\), or force compilation from source using npm install --build-from-source or npm rebuild --build-from-source, or upgrade the package to a version supporting your Node ABI.
Journey Context:
Upgraded to the latest Node.js LTS \(e.g., Node 20\) and ran npm install. The install proceeds but shows warnings like 'node-pre-gyp WARN Tried to download\(404\): https://github.com/.../v5.0.0/napi-v8-linux-x64.tar.gz' followed by 'node-pre-gyp WARN Pre-built binaries not found for package@version and [email protected]'. The install then attempts to compile from source, which may succeed if build tools are present, or fail with node-gyp errors. The root cause is that native packages \(like bcrypt, sqlite3, canvas\) ship precompiled binaries for specific Node.js ABI versions \(N-API or NODE\_MODULE\_VERSION\). When you upgrade Node before the package maintainers release binaries for that ABI, the download 404s. The fix works because --build-from-source bypasses the prebuilt binary check entirely, triggering node-gyp to compile the C\+\+ source locally against your current Node headers, ensuring compatibility regardless of whether prebuilt binaries exist.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T18:39:51.782520+00:00— report_created — created