EthioDeploy
DocsPricingDomainsBlogToolsChangelog

Blog/Fix deploy errors

"The engine node is incompatible": fix Node version mismatches on deploy

BS
Brook SolomonPublished November 24, 2026
Share on XShare on LinkedIn
engines.node

THE SHORT ANSWER

The error means the Node version running your install is outside a range in engines.node, either your own package.json or a dependency's. Yarn 1 stops on it by default; npm only warns unless engine-strict is on; pnpm warns for your project and fails for dependencies when engine-strict is set. Fix it by choosing the Node version on the build machine; loosening the check only hides the problem. Set engines.node to a bounded range such as "24.x", and check how your host reads it. Heroku and Vercel read engines.node, Render reads NODE_VERSION, .node-version and .nvmrc before it, and nixpacks reads NIXPACKS_NODE_VERSION before everything else and only knows whole majors. Run node -v in your build command to see what you actually got.

What does "The engine node is incompatible" mean?

A package declares the Node versions it supports in the engines field of its package.json. When the Node running the install doesn't match, the package manager complains. The wording depends on which one you use. These are real outputs from Node 20.20.2 installing a package that asks for "node": ">=24":

# yarn 1.22.22 (fails by default)
error [email protected]: The engine "node" is incompatible with this module. Expected version ">=24". Got "20.20.2"
error Found incompatible module.

# npm 10.8.2 (warns, then installs anyway)
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '[email protected]',
npm warn EBADENGINE   required: { node: '>=24' },
npm warn EBADENGINE   current: { node: 'v20.20.2', npm: '10.8.2' }
npm warn EBADENGINE }

# npm with engine-strict=true in .npmrc (fails)
npm error code EBADENGINE
npm error engine Unsupported engine
npm error notsup Required: {"node":">=24"}
npm error notsup Actual:   {"npm":"10.8.2","node":"v20.20.2"}

# pnpm 10 with engine-strict=true (fails for a dependency)
 ERR_PNPM_UNSUPPORTED_ENGINE  Unsupported environment (bad pnpm and/or Node.js version)
Your Node version is incompatible with "file:../dep".

npm's docs call the field “advisory only”: it produces warnings unless engine-strict is set, and then npm “will stubbornly refuse to install”. So the same repo can install fine with npm on your laptop and fail with Yarn in CI, or the reverse if your repo has an .npmrc with engine-strict=true.

The warning is not always harmless when npm lets it through. A package with native bindings can skip the binary for your Node version and fail later in the build with a different error, such as “Cannot find native binding”. When a build breaks after an EBADENGINE warning, treat the warning as the cause.

Quick checklist

What you seeLikely causeFix
Works locally, fails on the hostYour shell uses nvm, the host uses its own defaultSet the version where the host reads it (table below)
A dependency is named in the errorYou upgraded a package that dropped your Node versionRaise your Node version, or pin the older package
Host ignores your .nvmrcIt reads engines.node or an env var firstPut the same version in engines.node
A new Node major appeared overnightAn open range like >=20 resolves to the newest releaseUse a bounded range such as 24.x
Right major, still failingA package needs a newer minor, like >=22.12Check node -v in the build log; move to the next major if the host only picks majors

How do you set engines.node and .nvmrc?

Put the range in package.json. A major with .x is the safe default:

{
  "engines": {
    "node": "24.x"
  }
}

Avoid open-ended ranges. Heroku's docs advise against >= 26.x because it “could install a higher version of Node.js than intended”, and Render warns that “an unbounded range (such as >=20) always resolves to the latest release”. Your app then moves to a new major the day the platform adds it.

.nvmrc is for your own machine. nvm reads it when you run nvm use or nvm install without a version, searching up from the current directory. The file holds one version, such as 24 or lts/*. nvm doesn't read engines, so keep the two in agreement:

echo "24" > .nvmrc
nvm install   # installs and switches to Node 24
node -v

How does each platform pick the Node version?

Each host reads different files, in a different order:

PlatformReads, first match winsDefault
nixpacksNIXPACKS_NODE_VERSION, engines.node, .nvmrc, .node-versionNode 18
Herokuengines.node (its docs describe no other file)26.x
RenderNODE_VERSION env var, .node-version, .nvmrc, engines.nodeDepends on when the service was created; 24.22.1 for new ones
Vercelengines.node, then the Node.js Version project setting26.x

The details that cause surprises:

  • nixpacks picks whole majors. Its Node provider takes the newest even major it knows (24 at most in v1.41) that overlaps your range, so >=18 becomes Node 24. A range it can't meet falls back to 18: >=26 gives Node 18. An env var beats engines.node, and engines.node beats .nvmrc.
  • Vercel offers only majors (26.x, 24.x and 22.x today), and engines.node overrides the project setting. >=22.0.0 deploys the latest 26.x.
  • Render resolves ranges and aliases like lts, and a NODE_VERSION set in the dashboard beats every file in the repo.
  • Heroku accepts a major (26.x), a minor (26.13) or an exact version, and recommends the major range so security releases arrive on their own.

Whatever the host, print the version at the start of the build. Add node -v && in front of your build command once, read the log, then remove it.

What happens on EthioDeploy?

Apps without a Dockerfile build with nixpacks, and EthioDeploy passes NIXPACKS_NODE_VERSION=22 so nothing lands on nixpacks' Node 18 default. For a Node-only project without its own nixpacks.toml, that resolves to Node 22.19, and the build log says:

Using Node 22.19 (newer nixpkgs archive than nixpacks' default 22.11).

Because that variable outranks engines.node inside nixpacks, the runner reads your engines.node first and decides whether to keep it:

  • The range allows 22.19 (>=18, >=20.9, ^22, *, no engines at all): you build on Node 22.19. Plain nixpacks would turn >=18 into Node 24; here it stays on 22.
  • The range rules out 22.19 and nixpacks can meet it (24, 24.x, ^24, >=24, >=22.23.4): the floor is dropped, nixpacks resolves the range on its own, and you get Node 24. The log says:
Using Node 24 from package.json engines.node (">=24").
  • The range rules out 22.19 but nixpacks has nothing newer to offer (^22.20, which nixpacks maps back to 22, or >=26, which it maps to 18): you build on Node 22, and the log tells you so:
package.json engines.node is "^22.20", which nixpacks can't provide; building on Node 22. Set NIXPACKS_NODE_VERSION (e.g. 24) to choose a version.

To choose the version yourself, add NIXPACKS_NODE_VERSION (for example 24) under Environment Variables and leave “Runtime only” off, so the build sees it. Project variables come after the platform's own flag, so yours wins. Node 24 currently resolves to 24.10, so a package that needs a later 24 minor still won't install; nixpacks picks majors, not minors.

.nvmrc and .node-version don't change the version here, because NIXPACKS_NODE_VERSION is read before them. Use engines.node or the env var. With your own Dockerfile none of this applies: the FROM line picks Node. More in Deploy a Node.js app, and for a different install failure see npm ERESOLVE peer dependency errors.

Questions

Yarn 1 printed it because a package's engines.node range doesn't include the Node version running the install. Yarn 1 stops on it by default. Install a Node version inside the range, or pass --ignore-engines only if you're sure the package works on your version.

npm treats engines as advisory unless engine-strict is true, in .npmrc or on the command line. With engine-strict on, the same mismatch is an error and npm refuses to install.

Render does, after the NODE_VERSION env var and .node-version and before engines.node. Vercel uses engines.node and the project setting. Heroku's Node.js docs describe only engines.node. Putting the same major in engines.node works on all three.

Use a bounded range like 20.x or 24.x. Hosts resolve an open range like >=20 to the newest Node they have, so a new major can reach production without a code change.

Set engines.node to a range that rules out Node 22, such as "24.x" or ">=24", or add the env var NIXPACKS_NODE_VERSION=24 with Runtime only off. Then redeploy. The build log names the Node version it chose.

Sources

Checked on November 24, 2026:

  • npm: package.json engines
  • npm: config engine-strict
  • Yarn classic: yarn install --ignore-engines
  • nvm README: .nvmrc
  • Nixpacks: Node provider
  • Nixpacks source: Node version resolution
  • Heroku: Node.js support
  • Render: Setting your Node.js version
  • Vercel: Supported Node.js versions

Push a repo. Get a URL.

  • Deploy a Node.js app
  • Deploy an Astro app
  • Environment variables
  • Troubleshooting deploys
Start free

Join the EthioDeploy Telegram

Release notes as they ship, plus deploy help from the team and other developers.

Join on Telegram
BS
WRITTEN BYBrook SolomonFounder, EthioDeploy

Brook Solomon founded EthioDeploy and builds its deploy pipeline, build servers and AI coding agent. The posts here come from errors seen in real deploys on the platform.

All posts by Brook →
On this page
  • What does "The engine node is incompatible" mean?
  • Quick checklist
  • How do you set engines.node and .nvmrc?
  • How does each platform pick the Node version?
  • What happens on EthioDeploy?
  • Questions
  • Sources
0% read

Keep reading

  • ERR_TOO_MANY_REDIRECTS

    Fix deploy errorsNov 24, 2026

    ERR_TOO_MANY_REDIRECTS behind a proxy: causes and fixes

    ERR_TOO_MANY_REDIRECTS behind a proxy almost always means your app thinks an HTTPS request is HTTP and redirects it to HTTPS, forever. The proxy ended TLS and forwarded plain HTTP with an X-Forwarded-Proto: https header the app ignores. Tell the framework to trust its proxy: app.set("trust proxy", 1) in Express, SECURE_PROXY_SSL_HEADER in Django, trustProxies in Laravel, config.assume_ssl in Rails, AUTH_TRUST_HOST for Auth.js. If Cloudflare sits in front with SSL set to Flexible, change it to Full (strict). The other common loop is two layers redirecting in opposite directions, such as www to apex in one and apex to www in the other.

  • service_role

    Fix deploy errorsNov 24, 2026

    Leaked Supabase service_role key: what to do now

    A leaked service_role key gives anyone full access to your database, because it bypasses Row Level Security. Act in this order: create a new secret key (sb_secret_) and move your server code to it, switch browser code to a publishable key, deactivate the legacy anon and service_role keys under Settings > API Keys, then revoke the legacy JWT secret, since that secret is what makes the old key valid. Read your logs before they expire (one day on the Free plan), turn on RLS for every exposed table, and move the code that needed the key to a server so it never reaches the bundle again. Removing it from git history comes last and doesn't undo the leak.

  • exit 137

    Fix deploy errorsNov 24, 2026

    Container killed with exit code 137: OOM or SIGKILL?

    Exit code 137 is 128 + 9: the process was killed with SIGKILL. In a container that usually means it went over its memory limit and the kernel's OOM killer stopped it, but docker kill and a docker stop that ran out of patience give 137 too. Check with docker inspect: State.OOMKilled is true only for a memory kill. Then make the app fit: cap Node's heap below the container limit with --max-old-space-size, run fewer Python workers or recycle them with max_requests, stream large data instead of loading it, and give the build its own memory budget, separate from the running app.

EthioDeploy

Agentic first development and deployment, started in Ethiopia, built for developers everywhere.

Telegram community
Product
PricingAI coding agentAgent mode docsDomainsCLIFree backend hostingHosting in EthiopiaChangelog
Deploy guides
Next.jsNode.jsPythonSvelteKitTanStack StartAstroNuxtReact RouterHonoStrapiPayload CMSDjangoFastAPIFlaskStreamlitExpressNestJSLaravelRailsGoSpring BootASP.NET CoreTelegram botDiscord botWhatsApp botLovableBoltReplitv0Google AI StudioBase44Firebase StudioClaude Code & Cursor
Compare
vs Herokuvs Vercelvs Rendervs Railwayvs Fly.iovs Netlifyvs KoyebHeroku alternativesVercel alternativesNetlify alternativesRender alternativesRailway alternativesFly.io alternativesReplit alternativesPythonAnywhere alternativesDigitalOcean App Platform alternativesGlitch alternatives
Resources
DocsBlogFree toolsAboutSupportContactllms.txt
© 2026 EthioDeployPay by card in USD or bank transfer in ETBTermsPrivacy