All guidesVercel and env vars
On this page

Vercel error

Node.js Version "20.x" is discontinued and must be upgraded on Vercel: the fix

By Ohad Krispin, founder of VibeRaven · LinkedIn

Short answer

"Node.js Version "20.x" is discontinued and must be upgraded" is the error a Vercel build fails with since 2026-10-01, the date Vercel stopped building and deploying with Node.js 20, five months after Node.js 20 reached end of life on 2026-04-30. Fix it by changing an engines.node pin of 20.x in package.json to 24.x, or, when package.json has no engines, by setting Node.js Version to 24.x in Project Settings, then redeploy.

Next step in your repo: run

npx -y viberaven@1.8.0 changes
.

It reports an engines.node pin that allows Node 20 at most as vercel-node20-to24, with the file and line.

Or ask your coding agent to "run npx -y viberaven@1.8.0 changes and fix what it reports".

Use this from your agent
  • Claude Code: 7 read-only tools; public repos only.
    claude mcp add --transport http viberaven https://viberaven.dev/mcp
  • Codex: same server, from the Codex CLI.
    codex mcp add viberaven --url https://viberaven.dev/mcp
  • In your repo: writes Vercel + Supabase check rules for your agent (what it writes).
    npx -y viberaven init
Output of @vercel/build-utils 15.0.2 for six Node.js settings: engines 20.x, ^20.0.0 and Project Settings 20.x fail with the discontinued error; a range of 20 or newer resolves to 24.x.
Output of @vercel/build-utils 15.0.2 for six Node.js settings: engines 20.x, ^20.0.0 and Project Settings 20.x fail with the discontinued error; a range of 20 or newer resolves to 24.x.

The two wordings: engines or Project Settings

Vercel's build code words the second sentence by where the version came from: with an engines field in package.json it asks you to change package.json, and with none it points at Project Settings. These are the two messages from our run, the same text builders posted from failed Vercel builds in October 2026:

Output
Node.js Version "20.x" is discontinued and must be upgraded. Please set "engines": { "node": "24.x" } in your `package.json` file to use Node.js 24.
Node.js Version "20.x" is discontinued and must be upgraded. Please set Node.js Version to 24.x in your Project Settings to use Node.js 24.

I changed Project Settings and it still says 20.x

Then package.json still pins it. Vercel's docs say engines.node overrides the version selected in Project Settings, and when the two differ the build log prints the warning below, from Vercel's build code, with your values filled in. Fix engines, or remove it so the Project Settings version applies. Vercel's one-click upgrade for deprecated versions changes Project Settings only, so a pinned engines field still needs the edit by hand.

Output
Warning: Due to "engines": { "node": "20.x" } in your `package.json` file, the Node.js Version defined in your Project Settings ("24.x") will not apply, Node.js Version "20.x" will be used instead. Learn More: https://vercel.link/node-version

Move the project off Node 20

  1. 1
    Find where the version is pinned. Look at the engines field in every package.json Vercel builds, including the one in your Root Directory in a monorepo:
    Terminal
    grep -rn --include=package.json -E '"node": *"[^"]*20' --exclude-dir=node_modules .
  2. 2
    If engines pins 20, change it to "24.x" (or "22.x" if a dependency is not ready for 24) and commit.
  3. 3
    If package.json has no engines field, open the project in the Vercel dashboard, then Settings, Build and Deployment, Node.js Version, and select 24.x.
  4. 4
    Install and build locally on the same major version, with nvm use 24 or your version manager, and run your tests.
  5. 5
    Redeploy, and check that the build passes and its log has no Due to "engines" warning.
  6. 6
    Set the same version in CI and your local version manager so the three do not drift apart.

Which Node.js setting fails, and what changes on 22 and 24

Checked against Vercel's changelog, docs and build code on 2026-10-24. That day we also ran Vercel's own @vercel/build-utils 15.0.2 package with each Node.js setting; the image above shows its output.

What each Node.js setting does on Vercel

Only the major version counts. Vercel builds with Node.js 24.x, the default for new projects, and 22.x.

Node.js settings and what a Vercel build does with them since 2026-10-01
SettingWhat the build doesSeen in
engines.node "20.x" in package.jsonFails, with the message that asks you to change package.jsonOur build-utils run
engines.node "^20.0.0"Fails, with the same package.json messageOur build-utils run
No engines, Project Settings 20.xFails, with the message that points at Project SettingsOur build-utils run
engines.node ">=20"Builds on the latest 24.x, the newest version the range allowsOur build-utils run
engines.node "24.x", "^24.0.0" or ">=22.0.0"Builds on the latest 24.xVercel's docs
engines.node "20.x" and Project Settings 24.xengines overrides Project Settings, and the log prints the Due to "engines" warning, so change package.jsonVercel's docs and build code
.nvmrc or .node-version onlyIgnored: neither file chooses the version on VercelVercel's docs

What can break when you move off Node 20

Changes in Node.js 22 and 24 that can break an app built on Node.js 20
ChangeWhat to check
Node.js 22 removed crypto.createCipher and crypto.createDecipherSearch your code for both calls
Node.js 22 dropped import assertionsChange assert { type: 'json' } to with { type: 'json' }
Native addons are built per Node.js versionReinstall packages with compiled code on the new version
Node.js 24 ships npm 11Install and build with it locally before you deploy
Node.js 24 warns on url.parse() in your own codeRead the warnings in your build and test output
Node.js 24 removed tls.createSecurePairSearch your code for the call
Node.js 24 uses OpenSSL 3.5, which rejects RSA, DSA and DH keys shorter than 2048 bits and RC4 cipher suitesCheck the keys and TLS settings your app loads

Official docs behind this checklist

FAQ for builders before launch

Will my existing deployments stop working?

No. Vercel says deployments created before 2026-10-01 are not affected and keep running on Node.js 20. Only new builds fail, which includes a redeploy of an old commit.

Should I pick 22.x or 24.x?

Vercel defaults new projects to 24.x, the newer of the two lines it supports. Pick 22.x only if a dependency does not run on 24 yet, and plan the next move.