Node.js 20 Is Dead and 24 Just Left Active Support: Node 24 vs Node 26 LTS in 2026

If your production containers still say FROM node:20, you are running an unsupported runtime right now. Node.js 20 “Iron” hit end of life on April 30, 2026 — no more security patches, no more CVE fixes, no more releases of any kind. Then on October 20, 2026, Node.js 24 “Krypton” quietly left active support and entered maintenance. Two weeks later, on October 28, 2026, Node.js 26 “Lithium” became the new Long Term Support line.

That leaves most teams with a decision they did not plan for: jump two majors to 24, jump three to 26, or keep patching a runtime that will never receive a security fix again. This guide is the decision framework I use, with the real dates pulled from the official Node.js release schedule and the migration steps that actually break builds.

TL;DR — the 30-second verdict

  • Stay on Node.js 24 if you ship to paying customers today and need the widest ecosystem compatibility. It is in maintenance until April 30, 2028, so you get security fixes for another 17 months with zero feature churn.
  • Move to Node.js 26 if you are starting a new service, or if your dependency tree is already current. It is the LTS line until April 30, 2029 and gives you the longest runway.
  • Never stay on Node.js 20. End of life means no security releases. Every week you wait, your risk surface grows and your upgrade scope grows with it.
  • Skip Node.js 22 unless you are already on it. It is in maintenance with an EOL of April 30, 2027 — you would be migrating twice in 18 months.

The full support picture in one table

Every date below comes from the official nodejs/Release schedule, not from blog posts or memory:

Release lineCodenameEntered LTSActive support endsMaintenance ends (EOL)Status in Nov 2026
Node.js 20Iron2023-10-242024-10-222026-04-30Dead — no patches
Node.js 22Jod2024-10-292025-10-212027-04-30Maintenance only
Node.js 24Krypton2025-10-282026-10-202028-04-30Maintenance only
Node.js 26Lithium2026-10-282027-10-202029-04-30Active LTS

The mistake I see most often is treating “LTS” as a single state. It is two states. During active support, a line receives bug fixes, security fixes, and backports of some new features. During maintenance, it receives security fixes and critical regressions only — no new features, no performance work, no toolchain updates. Node.js 24 is safe but frozen. Node.js 26 is safe and moving.

Use case decision matrix

Your situationRuntime to pickWhy
Customer-facing service with a large dependency treeNode.js 24Maintenance until 2028; nothing new to break
New service started this quarterNode.js 26Longest support window, active LTS
Monorepo with 40+ workspaces and shared native modulesNode.js 24Fewer ABI surprises; one rebuild, not two
Serverless functions on a managed platformCheck the platform firstRuntime availability decides, not your preference
Currently on Node.js 22 and stableStay, plan for 26 in 2027Skipping 24 avoids a second migration
Still on Node.js 20 in productionNode.js 24 immediatelyShortest path out of an unsupported runtime
CLI tool or library published to npmTest against 24 and 26Your engines field is somebody else’s outage

Node.js 24 — the boring, correct choice for production

Node.js 24 is what I recommend for almost every team that asks me this question in late 2026. It has been in production use for over a year, its dependency ecosystem has caught up, and it will receive security patches until April 2028. “Boring” is a feature when you are on call.

The migration from 20 to 24 is mostly mechanical. The three things that break in practice are native addons, pinned Docker tags, and CI caches.

Step 1: pin the runtime instead of trusting the base image

Do not rely on node:lts — that tag silently moved to 26 on October 28, 2026. Pin the major:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# Dockerfile — explicit, reproducible, no silent major bump
FROM node:24.22.3-bookworm-slim AS build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci --omit=dev=false
COPY . .
RUN npm run build

FROM node:24.22.3-bookworm-slim AS runtime
ENV NODE_ENV=production
WORKDIR /app
COPY --from=build /app/dist ./dist
COPY --from=build /app/node_modules ./node_modules
COPY package.json ./
USER node
EXPOSE 3000
CMD ["node", "dist/server.js"]

Two details matter here. First, the version is fully pinned (24.22.3), so a rebuild in March 2027 produces the same runtime as today. Second, USER node is set before the CMD, because running as root inside a container is the other classic mistake in Node images.

Step 2: declare the supported range in package.json

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
  "name": "my-service",
  "engines": {
    "node": ">=24.0.0 <27"
  },
  "scripts": {
    "start": "node dist/server.js",
    "test": "node --test"
  }
}

The engines field is documentation that npm can enforce with npm ci --engine-strict. It is the cheapest guardrail you will ever add: it fails the build on Node 20 instead of failing at 3 a.m. in production.

Step 3: run a real CI matrix, not a single job

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# .github/workflows/ci.yml
name: ci
on: [push, pull_request]
jobs:
  test:
    runs-on: ubuntu-24.04
    strategy:
      fail-fast: false
      matrix:
        node: ["24", "26"]
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: ${{ matrix.node }}
          cache: npm
      - run: npm ci
      - run: npm test
      - run: npm run build

Testing both lines costs a few CI minutes and tells you exactly when Node.js 26 is safe for your tree. When the 26 leg has been green for a month, you flip the production pin. That is the entire migration strategy.

Step 4: rebuild native modules from source

node-gyp-based packages (bcrypt, sharp, canvas, better-sqlite3, older sqlite3) compile against the runtime’s ABI. Cached prebuilds for Node 20 will not load on Node 24. If your build cache survives the upgrade, you get this at startup:

1
2
3
4
5
Error: The module '/app/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 115. This version of Node.js requires
NODE_MODULE_VERSION 137. Please try re-compiling or re-installing
the module.

The fix is not to hunt for prebuilds — it is to throw away the cache:

1
2
3
rm -rf node_modules ~/.npm/_cacache
npm ci
npm rebuild --build-from-source

In CI, set the cache key to include the Node major so this never happens again:

1
2
3
4
5
6
- uses: actions/setup-node@v4
  with:
    node-version: "24"
    cache: npm
    cache-dependency-path: |
      package-lock.json

Better yet, prefer N-API packages. Anything built on Node-API (N-API) is ABI-stable across majors and survives the upgrade without a rebuild. If a dependency still ships raw V8 bindings in 2026, that is a maintenance signal about the package itself.

Node.js 26 — the long runway, if your tree can take it

Node.js 26 became LTS on October 28, 2026 and stays supported until April 2029. For a new service, that is three years of security coverage before you have to think about this again. The catch is that a brand-new LTS line always spends its first months exposing assumptions in the ecosystem.

In practice the friction is concentrated in three places:

  1. Deprecated core APIs removed. Each major removes long-deprecated surface. Run your test suite with --throw-deprecation to surface them before the upgrade, not after:
    1
    
    NODE_OPTIONS="--throw-deprecation" npm test
    
  2. Toolchain assumptions. Linters, bundlers, and test runners that pin engines to a specific major will warn or refuse to install. npm ls --all plus a lockfile refresh usually resolves it.
  3. Legacy OpenSSL flags. Any script still passing --openssl-legacy-provider to work around old webpack crypto configs needs that workaround removed, not carried forward. Modern bundlers do not need it, and keeping it forces the legacy provider into your runtime.

Migrating straight from 20 to 26 skips two majors of deprecation cycles at once. If you have the engineering time, that is fine and even preferable. If you do not, go 20 → 24 now and 24 → 26 in 2027 when 26 has a year of production mileage.

The five traps that turn a one-day upgrade into a two-week incident

Trap 1: the floating LTS tag. node:lts and node:lts-alpine are moving targets. On October 28, 2026 they switched to 26. If your Dockerfile uses them, you upgraded your runtime without a commit. Pin the full version.

Trap 2: lockfile drift across majors. npm ci against a lockfile generated on Node 20 can resolve optional platform-specific dependencies differently. Regenerate the lockfile on the new major, review the diff, then commit it as its own change so you can revert it independently.

Trap 3: CI cache poisoning. Build caches keyed only on package-lock.json survive a runtime change and reintroduce Node 20 native binaries. Include the Node major in the cache key — always.

Trap 4: serverless runtime lag. Managed platforms ship new Node majors months after the official release. If you deploy to a platform that still tops out at 22, your “migration” is really a platform migration. Check the platform’s supported runtime list before you plan anything.

Trap 5: testing only the happy path. The upgrade changes error message formats, Error.cause handling in some libraries, and stream behavior in edge cases. Run your integration suite against a staging deployment on the new major — a green unit test suite has never caught an ABI mismatch.

Why not just stay on Node.js 20?

Because “it still works” and “it is supported” are different claims, and only one of them survives an audit.

Node.js 20 stopped receiving security patches on April 30, 2026. A CVE published in December 2026 against the runtime, a core module, or a bundled dependency like npm will not be fixed for you. Container scanners will start flagging the base image, which means your build pipeline fails compliance checks — the exact failure mode that forces rushed, unreviewed upgrades at the worst possible moment.

The cost asymmetry is stark. A planned 20 → 24 migration is a day of Dockerfile edits, a lockfile regeneration, one native rebuild, and a staging soak. An emergency migration after a disclosure is the same work compressed into a weekend, with no staging soak and no rollback plan.

Migration checklist you can paste into a ticket

  • Pin the exact runtime version in every Dockerfile (node:24.22.3-bookworm-slim)
  • Add engines.node and run npm ci --engine-strict in CI
  • Regenerate package-lock.json on the target major and commit it separately
  • Delete node_modules and the npm cache, then npm ci from scratch
  • Rebuild every node-gyp dependency; prefer N-API alternatives
  • Run tests with --throw-deprecation to catch removed APIs early
  • Add the target major to the CI matrix before flipping production
  • Include the Node major in every CI cache key
  • Soak in staging for a week before switching traffic
  • Remove --openssl-legacy-provider and other compatibility flags

If you are still deciding which runtime fits your workload beyond Node, our comparison of Node.js, Bun and Deno covers when leaving the Node ecosystem is worth it. If your upgrade touches container base images, the Alpine vs distroless vs Debian slim analysis explains why slim images behave differently with native modules. And if you are modernizing your HTTP layer at the same time, see the Node.js HTTP framework comparison.

FAQ

Is Node.js 20 really unusable after April 30, 2026? It still runs — the binaries do not self-destruct. But it receives no security fixes, so any newly disclosed vulnerability in the runtime or its bundled components stays unpatched. Treat it as unsupported, not as broken.

How long does the Node.js 24 to Node.js 26 migration take? For a typical service with a healthy test suite, one to three days of engineering time plus a staging soak. The work is dominated by native module rebuilds and lockfile regeneration, not by application code changes.

Can I run Node.js 26 in production today? Yes, it has been the active LTS line since October 28, 2026. The question is ecosystem readiness, not runtime stability: check whether your native dependencies ship N-API builds and whether your managed platform supports it.

Do I need to change my application code to move from 20 to 24? Usually no. Removed core APIs surface as deprecation warnings if you enable --throw-deprecation before upgrading. The real breakage is almost always in native addons and build tooling, not in application logic.

Should libraries support Node.js 20 after EOL? No. Declare engines.node >= 24 and let consumers see the constraint at install time. Supporting an EOL runtime means shipping code paths you cannot test against a supported baseline.

What about Node.js 22 — can I skip it? Yes, and most teams should. It is in maintenance until April 30, 2027, so adopting it now means migrating again within 18 months for no benefit.


💰 想测试你的市场判断力?我用 Polymarket 做预测市场交易——这是全球最大的预测市场平台,从大选结果到技术监管时间线,什么都可以押注。和赌博不同,这是真正的信息市场:你懂的信息越多,胜率越高。我靠预测技术相关事件的走向已经赚了不少。用我的邀请链接注册:Polymarket.com