Node ERR_INTERNAL_ASSERTION in CI - Diagnose the Internal Failure
ERR_INTERNAL_ASSERTION is an internal invariant failure inside Node itself, usually triggered by a bug in Node, a native addon, or memory corruption.
What this error means
A node process crashes in CI with Error [ERR_INTERNAL_ASSERTION] and a message that this is likely a bug in Node.js, pointing at internal code rather than yours.
node
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/issues
at new NodeError (node:internal/errors:387:5)Common causes
A bug in the running Node version
A specific Node release has an internal invariant that fails for some inputs; another version does not.
A native addon corrupting internal state
A misbehaving native module violates Node internal expectations, tripping the assertion.
How to fix it
Pin a different Node version
- Switch the CI Node version to a known-good release.
- Re-run to see if the internal assertion clears.
GitHub Actions
- uses: actions/setup-node@v4
with:
node-version: 20.18.0Isolate or update the native addon
- Disable the suspect native dependency to confirm it is the trigger.
- Upgrade it or replace it with a pure-JS alternative.
How to prevent it
- Pin and test Node version upgrades, keep native addons current, and report reproducible internal assertions upstream with the stack trace.
Related guides
Node AssertionError in CI - Fix the Failed InvariantFix the Node.js AssertionError in CI by correcting the value that violates the assertion or fixing the assert…
Node "Segmentation fault" from a Native Addon in CI - Diagnose the CrashFix Node.js segmentation faults from a native addon in CI by rebuilding the addon for the runner, upgrading i…
Node native addon dlopen Fails at Runtime in CI - Fix the ABI MismatchFix Node.js native addon dlopen failures at runtime in CI by rebuilding the addon against the runner Node ver…