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.
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.
- 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.