Skip to content
Latchkey

Node "Unsupported engine ... required: node" in CI

A package declares a minimum Node in its engines.node field, and the CI runner is older. With strict engine checking, npm fails the install; otherwise it warns but the package may break at run time.

What this error means

Install or run fails with "npm warn EBADENGINE Unsupported engine" or "error ... engine \"node\" is incompatible with this module. Expected version >=18".

npm
npm error code EBADENGINE
npm error engine Unsupported engine
npm error engine Not compatible with your version of node/npm
npm error notsup Required: {"node":">=18.0.0"}
npm error notsup Actual:   {"node":"16.20.2"}

Common causes

Runner Node older than a dependency requires

A dependency raised its engines.node floor; the CI runner pins an older Node that no longer satisfies it.

engine-strict turns the warning into a failure

With engine-strict=true in .npmrc, the otherwise-warning EBADENGINE aborts the install.

How to fix it

Pin a Node version that satisfies the engines field

Raise the runner Node to meet the highest engines.node floor across your dependencies.

.github/workflows/ci.yml
- uses: actions/setup-node@v4
  with:
    node-version: '20'

Align your own engines field

Declare a supported range in your package.json so CI and consumers agree on the floor.

package.json
{
  "engines": { "node": ">=18.0.0" }
}

How to prevent it

  • Keep the CI Node version at or above your dependencies' floor.
  • Pin Node with .nvmrc and engines so versions are explicit.
  • Review engines changes when upgrading dependencies.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →