← All errors · VercelVercel build & deploy errors

Vercel build broke after Node.js 26 became the default / Node.js 20 deprecated

What you see

A deploy that worked before now fails, or the app behaves differently after a redeploy, with no code change. Two Vercel changes line up with this. Node.js 20 was deprecated for Builds and Functions on October 1, 2026: it is disabled in Project Settings, and an existing project that still uses 20 for Functions shows an error when a new deployment is created. And on October 29, 2026 Vercel made Node.js 26 generally available and the default for all new projects; an existing project whose package.json engines.node range allows 26 (such as >=20) builds on 26 on its next deployment.

What it means

Vercel only offers whole major Node.js versions, currently 26.x (default), 24.x and 22.x, and rolls out minor and patch updates on its own. The version comes from Project Settings (Build and Deployment > Node.js Version), but a valid engines.node range in package.json overrides that setting. Existing deployments are not affected: already-deployed functions keep working, and only new deployments pick up the change. So a break shows up on the next deploy, either because the project still asks for Node 20, or because an open range like >=20 silently moved the app to Node 26. On Node 26 the built-in fetch in Vercel Functions negotiates HTTP/2 with servers that support it, and for HTTP/2 responses response.statusText is empty.

Likely causes

How to fix it

  1. See which Node version each project uses. The Vercel CLI lists it per project, and the --update-required flag lists projects affected by the Node 20 deprecation:

    npm i -g vercel@latest
    vercel project ls
    vercel project ls --update-required
  2. Pick the version on purpose with engines.node in package.json. It overrides the Project Settings version on the next deployment. Use 24.x to stay on the previous LTS, or 26.x to move to the new default. Avoid open ranges like >=20, which jump to the newest major:

    {
      "engines": {
        "node": "24.x"
      }
    }
  3. Or set it in the dashboard: your project > Settings > Build and Deployment > Node.js Version, then choose 26.x, 24.x or 22.x. That applies to new deployments; a valid engines.node value still wins.

  4. Match it everywhere else. Update any Node 20 pins in .nvmrc, .node-version and CI config, switch your local Node to the same major, reinstall dependencies, and run the build and tests before you push:

    node -v
    rm -rf node_modules
    npm ci
    npm run build
  5. If something in your functions broke only on Node 26 and it calls APIs with fetch, check response.status instead of response.statusText. To keep HTTP/1.1 for the built-in fetch in Vercel Functions, set the environment variable VERCEL_FETCH_DISABLE_H2 to 1 for the environments you need and redeploy. It applies to Functions on Node 26 and does not change fetch during builds. A custom dispatcher (setGlobalDispatcher, or a dispatcher passed to fetch) takes precedence.

    // before: empty on HTTP/2 responses
    if (res.statusText !== 'OK') throw new Error(res.statusText)
    
    // after
    if (!res.ok) throw new Error(`HTTP ${res.status}`)
  6. Prebuilt deployments: upgrade the Vercel CLI to 65.8.0 or later before deploying Node.js 26 Functions.

    npm i -g vercel@latest
    vercel --version
  7. If you truly cannot leave Node 20 yet, Vercel suggests deploying the app as a container: add a Dockerfile.vercel at the project root, and the image is built and deployed on every commit. You then manage the Node version and its security updates yourself, so treat it as a stopgap.

    # Dockerfile.vercel
    FROM node:20-alpine
    WORKDIR /app
    COPY . .
    RUN npm ci
    # your server must listen on $PORT
    CMD ["node", "server.js"]
  8. Test it: redeploy, then confirm the version. For the build, run node -v in the Build Command and read the build log. For a function, log process.version. The exact minor version can differ between the build and the function runtime.

    # Build Command in Project Settings
    node -v && npm run build
    
    // inside a function
    console.log('node', process.version)

Still stuck after trying this? Get it fixed for $49, or you don't pay.

Prevent this next time

Guide: catch outages before your users do.

Tools that help:

Some links on this page are affiliate links: if you sign up or buy through them, FixStack may earn a commission at no extra cost to you. Learn more.

FAQ

What does "Vercel build broke after Node.js 26 became the default / Node.js 20 deprecated" mean?

Vercel only offers whole major Node.js versions, currently 26.x (default), 24.x and 22.x, and rolls out minor and patch updates on its own. The version comes from Project Settings (Build and Deployment > Node.js Version), but a valid engines.node range in package.json overrides that setting. Existing deployments are not affected: already-deployed functions keep working, and only new deployments pick up the change. So a break shows up on the next deploy, either because the project still asks for Node 20, or because an open range like >=20 silently moved the app to Node 26. On Node 26 the built-in fetch in Vercel Functions negotiates HTTP/2 with servers that support it, and for HTTP/2 responses response.statusText is empty.

What usually causes it?

Project Settings > Build and Deployment > Node.js Version is still 20.x. Since October 1, 2026, 20 is disabled there, and new deployments of a project using 20 for Functions show an error. package.json pins engines.node to Node 20 (for example "20.x"), a version Vercel no longer lists (available: 26.x, 24.x, 22.x). engines.node is an open range such as >=20 or >=22.0.0, so the next deployment built on the latest 26.x and your code or a dependency is not ready for the new major. Function code reads response.statusText from fetch. On Node 26, fetch can use HTTP/2, and HTTP/2 responses have an empty statusText. You deploy with vercel build and vercel deploy --prebuilt using a Vercel CLI older than 65.8.0, which is needed to deploy Node.js 26 Functions. Local machine, .nvmrc, .node-version or CI still run Node 20, so the build passes locally and in CI but not on Vercel.

How do I fix it?

1. See which Node version each project uses. The Vercel CLI lists it per project, and the --update-required flag lists projects affected by the Node 20 deprecation: 2. Pick the version on purpose with engines.node in package.json. It overrides the Project Settings version on the next deployment. Use 24.x to stay on the previous LTS, or 26.x to move to the new default. Avoid open ranges like >=20, which jump to the newest major: 3. Or set it in the dashboard: your project > Settings > Build and Deployment > Node.js Version, then choose 26.x, 24.x or 22.x. That applies to new deployments; a valid engines.node value still wins. 4. Match it everywhere else. Update any Node 20 pins in .nvmrc, .node-version and CI config, switch your local Node to the same major, reinstall dependencies, and run the build and tests before you push: 5. If something in your functions broke only on Node 26 and it calls APIs with fetch, check response.status instead of response.statusText. To keep HTTP/1.1 for the built-in fetch in Vercel Functions, set the environment variable VERCEL_FETCH_DISABLE_H2 to 1 for the environments you need and redeploy. It applies to Functions on Node 26 and does not change fetch during builds. A custom dispatcher (setGlobalDispatcher, or a dispatcher passed to fetch) takes precedence. 6. Prebuilt deployments: upgrade the Vercel CLI to 65.8.0 or later before deploying Node.js 26 Functions. 7. If you truly cannot leave Node 20 yet, Vercel suggests deploying the app as a container: add a Dockerfile.vercel at the project root, and the image is built and deployed on every commit. You then manage the Node version and its security updates yourself, so treat it as a stopgap. 8. Test it: redeploy, then confirm the version. For the build, run node -v in the Build Command and read the build log. For a function, log process.version. The exact minor version can differ between the build and the function runtime.

Last checked against official docs on . Sources: Vercel changelog: Node.js 26 LTS is now Generally Available on Vercel (Oct 29, 2026), Vercel changelog: Node.js 20 is being deprecated on October 1, 2026, Vercel docs: Supported Node.js versions, Vercel docs: Advanced Node.js usage (HTTP/2 for fetch on Node.js 26).

Related errors

More Vercel errors and fixes →

Tools that help

  • Railway: Deploy backends and databases; new users get $20 credit.

Some links on this page are affiliate links: if you sign up or buy through them, FixStack may earn a commission at no extra cost to you. Learn more.

Get new fixes weekly

No spam. Unsubscribe anytime. Privacy