Node "ERR_INTERNAL_ASSERTION" in CI
Node hit an internal invariant it assumes is always true and aborted with ERR_INTERNAL_ASSERTION. This signals a Node bug or a native module poking at internals incompatibly - not your application logic.
What this error means
A run crashes with "ERR_INTERNAL_ASSERTION: This is caused by either a bug in Node.js or incorrect usage of Node.js internals". It often correlates with a specific Node patch release or a native dependency.
Error [ERR_INTERNAL_ASSERTION]: This is caused by either a bug in Node.js
or incorrect usage of Node.js internals.
Please open an issue with this stack trace at https://github.com/nodejs/node/issuesCommon causes
A bug in the pinned Node version
Certain Node patch releases shipped regressions that trip internal assertions under specific workloads.
A native addon using internals
A compiled module built against a different Node ABI reaches into internals incompatibly.
How to fix it
Move to a patched Node release
Pin to a Node version known to fix the assertion, often the latest patch of your major line.
# workflow
node-version: 20.x # use the latest patch on your majorRebuild native addons for the active Node
Reinstall or rebuild native modules so their ABI matches the running Node.
npm rebuild
# or fully reinstall
rm -rf node_modules && npm ciHow to prevent it
- Track Node patch releases and avoid known-bad versions.
- Rebuild native addons whenever the Node version changes.
- Keep a single Node version across build and runtime.