npm ERR! code EBADENGINE

npm returned EBADENGINE because the package declares Node.js or npm engine requirements that do not match the versions running your install.

npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine

Fix it fast

Most likely: The package requires a different Node.js or npm version than the one running the install.

Confirm this is your error

Match the output and confirm you are troubleshooting the same failure.

npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine

What Does Not Match This Runtime or Platform

npm returned EBADENGINE because the package declares Node.js or npm engine requirements that do not match the versions running your install.

Use a compatible runtime, platform, or published build

Switch to a supported Node version using your version manager or CI image, then reinstall dependencies.

If you control the package, only widen the engines field after confirming the code really supports the newer runtime.

If the failing dependency is outdated, upgrade to a version that supports your current Node or npm.

Why This Runtime or Platform Does Not Match

Usually this comes down to your current Node.js version is older or newer than the package supports, the package also constrains npm itself, and the running npm version is outside that range, or engine-strict or CI policy turns what would be a warning into a failing install.

Prove the Runtime and Published Build Now Line Up

node -v and npm -v now match the package's declared engines range, and re-run the original install and confirm EBADENGINE no longer appears.

Check runtime, platform, and index source

Print the current toolchain versions with node -v and npm -v, inspect the package requirements with npm view <pkg>@<version> engines or check the dependency package.json directly, and check whether strict enforcement is enabled with npm config get engine-strict.

How npm evaluates engine requirements

Packages can declare supported node and npm versions in the engines field of package.json. When your current runtime falls outside that range, npm warns or errors with EBADENGINE, especially when strict engine enforcement is enabled.

Prevent It From Coming Back

To prevent this, pin Node versions with .nvmrc, Volta, or CI setup so developers and runners use the same runtime, and check engines compatibility when upgrading Node or introducing new dependencies.

Need help or found a mistake? Contact RepoFlow support for questions.

Join our mailing list

Product updates, new tools, and practical guides from RepoFlow.