Skip to content

Node.js9 min read

Upgrade Node 24 to Node 26 LTS: React and Next.js Guide

Node 26 is the new LTS and Node 24 is in maintenance. How to move a React or Next.js app: engines, .nvmrc, CI, Docker, Vercel, breaking changes and testing.

If your React or Next.js project runs on Node 24, plan the move to Node 26 now. Node 26 became the Active LTS line on 28 October 2026, while Node 24 dropped to maintenance on 20 October 2026. The upgrade is mostly configuration (engines, .nvmrc, CI, Docker tags, your host's Node setting), plus a short list of removed APIs and behavior changes from Node 25 and 26 to check.

This guide is the checklist I would follow for a typical frontend repo: a Next.js or Vite app, a few Node scripts, a CI pipeline and either Vercel or a Docker image. Everything here comes from the official Node.js release notes and Vercel's docs, linked as we go.

Key takeaways

  • Node 26 (Lithium) is the current Active LTS, supported until the end of April 2029. Node 24 is in maintenance until 30 April 2028.
  • You are skipping Node 25, so read both the 25.0.0 and 26.0.0 breaking changes, not just 26.
  • Update every place the version is pinned: engines, .nvmrc, CI, Docker FROM lines and your host's settings.
  • Corepack is no longer bundled since Node 25. If your setup runs corepack enable, it needs a change.
  • On Vercel, Node 26 makes the built-in fetch negotiate HTTP/2, which leaves response.statusText empty. Check code that reads it.
  • Native addons need a rebuild: delete node_modules and reinstall on the new version.

Where Node versions stand in November 2026

From the Node.js releases page and endoflife.date:

Version Status Active support ends Security support ends
Node 26 (Lithium) Active LTS 27 Oct 2027 30 Apr 2029
Node 24 (Krypton) Maintenance LTS Ended 20 Oct 2026 30 Apr 2028
Node 22 (Jod) Maintenance LTS Ended 21 Oct 2025 30 Apr 2027
Node 25 End of life Ended 1 Apr 2026 Ended 1 Jun 2026
Node 27 Alpha Not released yet Not released yet

The Node 26.13.0 release is the one that marked the move to LTS. It has no code changes beyond 26.12.1 apart from LTS metadata, so if you already tested on a late 26.x Current release, you tested the same code.

Node 27 and the new annual schedule

Node 26 is the last line under the old "two majors a year, even numbers become LTS" model. The Node.js team announced a new schedule starting with 27:

  • One major release a year, in April, with LTS promotion in October.
  • A six-month alpha phase before each major (27 entered alpha in October 2026). Alphas are meant for library authors and CI, not production.
  • Every major becomes LTS, so the odd and even distinction goes away.
  • Major numbers will line up with the calendar year of the first Current release, so 27.0.0 in 2027.

For app teams this makes planning simpler: one upgrade a year, to a version that will be LTS. Node 26 to 27 will be the next one, around October 2027.

Why upgrade now

Maintenance LTS means Node 24 gets critical bug fixes and security patches only. It is safe to run in production for a while yet, but there are good reasons not to wait:

  • Hosts move their defaults. Vercel made Node 26 the default for new projects on 29 October 2026.
  • Upgrading while you are not under deadline pressure is cheaper than doing it when a dependency drops Node 24.
  • You get new platform features: the Temporal API on by default, V8 14.6 with Map.prototype.getOrInsert() and Iterator.concat(), and Undici 8 behind fetch().

Next.js lists Node.js 20.9 as its minimum, so Node 26 is well inside what the framework supports.

Step 1: update every pinned version

Start by finding everywhere the version lives:

Terminal
grep -rnE "node-version|\"node\"|FROM node|nodejs" --include=*.json --include=*.yml --include=*.yaml --include=Dockerfile --include=.nvmrc --include=.node-version --include=Jenkinsfile .

package.json engines

JSON
{
  "engines": {
    "node": "26.x"
  }
}

A wide range like >=20 also allows 26, but I prefer a single major. It documents what you actually tested, and on Vercel it decides the deployed version (more on that below).

.nvmrc or .node-version

Terminal
echo "26" > .nvmrc
nvm install
nvm use
node -v

Commit the file so everyone on the team switches when they pull.

CI

If you use GitHub Actions, point actions/setup-node at the same file so CI and laptops cannot drift apart:

YAML
- uses: actions/setup-node@v4
  with:
    node-version-file: .nvmrc
    cache: npm

If you use Jenkins with a Docker agent, as in my Jenkins vs Vercel comparison, change the agent image tag instead, for example from node:24-alpine to node:26-alpine.

Docker images

Official node:26 images are published on Docker Hub, including 26-alpine, 26-slim, 26-bookworm-slim and 26-trixie-slim. For the multi-stage Next.js Dockerfile in my Vercel vs self-hosting guide, every stage changes together:

Dockerfile
FROM node:26-slim AS deps
# ...
FROM node:26-slim AS builder
# ...
FROM node:26-slim AS runner

Use the same major in all stages. Building on one Node version and running on another is how native module errors sneak into production.

One more note from the 26.13.0 release notes: since Node 25, the official Linux binaries are linked against libatomic, and you may need to install it separately depending on your distribution. If you build your own base image from the official tarballs rather than using node:26, check for that.

Vercel

Vercel supports 26.x, 24.x and 22.x, and the docs explain how the version is chosen. You can set it under Settings → Build and Deployment → Node.js Version, but engines.node in package.json overrides that setting. A range like >=22.0.0 resolves to the latest 26.x, so some projects moved to Node 26 on their next deploy without anyone choosing it.

To check what you got, run node -v in the build command, or log process.version inside a function. If you deploy prebuilt output, Vercel's changelog says to use Vercel CLI 65.8.0 or later for Node 26.

Step 2: check the breaking changes

Because you are going from 24 to 26, you inherit everything that changed in 25 too. These are the items from the official Node 25.0.0 and Node 26.0.0 notes that I would check in a frontend repo.

From Node 25

  • Corepack is no longer distributed. If your README, Dockerfile or CI runs corepack enable to get pnpm or Yarn, that step will fail. Install Corepack from npm (npm install -g corepack) or install the package manager directly.
  • fs.F_OK, fs.R_OK, fs.W_OK and fs.X_OK were removed. Use fs.constants.F_OK and friends. Old build scripts are the usual place to find these.
  • SlowBuffer reached end of life. Use Buffer.allocUnsafeSlow().
  • Web Storage was enabled by default, and ErrorEvent became a global.
  • Deep equality in assert and util changed: comparing two promises now fails. This can turn a passing test red.
  • A long list of already-deprecated APIs moved to end of life, including the recursive option of fs.rmdir. Use fs.rm with { recursive: true }.
  • NODE_MODULE_VERSION went to 141.

From Node 26

  • Temporal is enabled by default. If you ship a Temporal polyfill for server code, test that it still behaves the way you expect next to the native one.
  • localStorage returns undefined when no storage file is configured. This matters for SSR code. A check like typeof localStorage !== 'undefined' is a common way to detect the browser, and Node 25's default Web Storage could confuse it. In 26 the global is undefined again unless you configure a file, but I would still detect the browser with typeof window !== 'undefined' and keep storage access inside effects.
  • Legacy stream modules were removed: _stream_readable, _stream_writable and the rest. Old dependencies sometimes import these directly. Use stream.
  • http.Server.prototype.writeHeader() was removed. Use writeHead().
  • module.register() is runtime-deprecated, and --experimental-transform-types is gone. If you run TypeScript scripts or custom loaders through Node flags, check them.
  • NODE_MODULE_VERSION is 147, so native addons must be recompiled.

Find the easy ones with a quick search:

Terminal
grep -rnE "fs\.(F|R|W|X)_OK|SlowBuffer|_stream_(readable|writable|duplex|transform|passthrough|wrap)|writeHeader\(|module\.register\(|corepack enable|experimental-transform-types" --exclude-dir=node_modules --exclude-dir=.next .

HTTP/2 fetch on Vercel

According to Vercel, the built-in fetch on Node 26 negotiates HTTP/2 with servers that support it, through Undici 8. On HTTP/2 responses response.statusText is empty, so code like if (res.statusText !== 'OK') breaks quietly. Use res.ok or res.status. Vercel documents an opt-out in its advanced Node.js docs: set VERCEL_FETCH_DISABLE_H2=1 to keep HTTP/1.1 for fetch in Vercel Functions. It does not change fetch during builds.

Step 3: a testing strategy that catches real problems

My order of operations for a project like this:

  1. Fresh install. Delete node_modules and run npm ci on Node 26. Native addons rebuild, and any install script that fails shows up immediately.
  2. Run the full pipeline locally: lint, type check, unit tests, next build. Read the build log for deprecation warnings. Node prints a warning the first time a runtime-deprecated API is used, which is how module.register() or stream deprecations surface.
  3. Run both versions in CI for a week. A matrix with 24 and 26 tells you whether a failure comes from the upgrade or from your change:
YAML
strategy:
  matrix:
    node: [24, 26]
steps:
  - uses: actions/setup-node@v4
    with:
      node-version: ${{ matrix.node }}
  1. Deploy a preview. On Vercel, a preview deployment with engines.node set to 26.x runs the real build and function runtime. Click through anything that calls external APIs from the server, because that is where the HTTP/2 change shows up.
  2. Smoke test production-like behavior: SSR pages, route handlers, image optimization, and any scripts in package.json that only run in CI or cron.
  3. Merge, then drop 24 from the matrix once production has run on 26 for a while.

FAQ

Is Node.js 26 LTS now?

Yes. Node.js 26.13.0, released on 28 October 2026, moved the 26.x line into Long Term Support with the codename Lithium. It gets updates until the end of April 2029.

Is Node 24 still supported?

Yes, but only with maintenance updates. Active support for Node 24 ended on 20 October 2026 and security support runs until 30 April 2028, so you have time, but new work should target Node 26.

Does Next.js work on Node 26?

The Next.js docs list Node.js 20.9 as the minimum version, so Node 26 meets the requirement. Vercel also made Node.js 26 the default for new projects on 29 October 2026.

What happened to Corepack in Node 26?

Node.js stopped distributing Corepack in version 25, so it is not bundled with Node 26 either. If you run corepack enable to get pnpm or Yarn, install Corepack separately or install the package manager another way.

When does Node 27 come out?

Node.js 27 is in its alpha phase now and 27.0.0 is planned for April 2027. From 27 onwards Node ships one major version a year and every major becomes LTS, so the odd and even split ends.

Wrapping up

Moving from Node 24 to Node 26 is a small upgrade if you treat it as a checklist: pin the version everywhere, read the 25 and 26 breaking changes, fix the Corepack step if you have one, and watch fetch responses on Vercel. Node 24 still has security support until April 2028, so there is no emergency, but Node 26 is where the ecosystem is heading. With the annual schedule starting at Node 27, this is also a good moment to make the upgrade routine, so next October is just another pull request. If you are deciding where to run the upgraded app, my Vercel vs self-hosting guide covers both paths.

  • #nodejs
  • #nextjs
  • #react
  • #deployment
  • #devops

Node.js11 min read

React WebSocket Guide: Real-Time Apps With Node.js

Build real-time apps with WebSockets in Node.js and React: ws vs Socket.IO, rooms, auth, reconnection and scaling across servers with Redis. Typed code inside.

Read article

Next.js10 min read

Deploy Next.js: Vercel vs Self-Hosting with Docker

Deploy Next.js on Vercel or self-host with Docker and standalone output. Compare costs, features, caching, ISR and the gotchas before you choose a host.

Read article