Report #5633
[bug\_fix] Native module ABI version mismatch \(NODE\_MODULE\_VERSION\)
Run npm rebuild to recompile native modules against the current Node.js version, or delete node\_modules and reinstall to trigger fresh builds for the current ABI.
Journey Context:
Developer uses nvm to switch from Node 16 to Node 18 for a project using bcrypt or sqlite3. Runs the app immediately after switching, without reinstalling. Gets hard crash: 'Error: The module was compiled against a different Node.js version. NODE\_MODULE\_VERSION 93 vs 108'. Developer sees the numbers, confused. Searches the error, learns that NODE\_MODULE\_VERSION is the ABI \(Application Binary Interface\) version. Each major Node version changes ABI, breaking native addons. The .node binary files in node\_modules are tied to the old Node version. Developer tries npm install, but npm sees the packages are already present and skips rebuild. Tries npm rebuild \(or npm rebuild bcrypt --update-binary\). This recompiles the C\+\+ code against the headers of the currently active Node version \(18\). Alternatively, they rm -rf node\_modules package-lock.json && npm install, which also works. The app now starts successfully.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T21:47:03.174038+00:00— report_created — created