Short answer: Node.js 20 reached end of life on 30 April 2026, so it no longer gets security fixes. Upgrade to Node.js 24 for most teams: it is supported until 30 April 2028, every major framework and hosting platform runs it in production today, and its changes from 20 are well known. Go straight to Node.js 26 (supported until 30 April 2029) if your platform runs it in production and your tests pass on it, and treat 22, which ends on 30 April 2027, only as a short stop.
Below: the support dates, the hosting deadlines that set your real date, framework minimums, six changes that break apps, how to check yours, and an upgrade path with a way back. Dates come from nodejs.org, each host's documentation and the npm registry, checked on 22 November 2026, and we ran every code example on Node.js 20.20.2, 22.23.5, 24.22.3 and 26.13.1. For other deadlines, see our end-of-life guide, or paste your package.json into our end-of-life checker.
When did Node.js 20 reach end of life, and how long are 22, 24 and 26 supported?
Node.js 20 reached end of life on 30 April 2026; its final release, 20.20.2, came out on 24 March 2026.
| Node.js | First released | Status on 22 November 2026 | End of life |
|---|---|---|---|
| 20 (Iron) | 18 April 2023 | End of life | 30 April 2026 (passed) |
| 22 (Jod) | 24 April 2024 | Maintenance LTS since 21 October 2025 | 30 April 2027 |
| 24 (Krypton) | 6 May 2025 | Maintenance LTS since 20 October 2026 | 30 April 2028 |
| 26 (Lithium) | 5 May 2026 | Active LTS since 28 October 2026, Maintenance LTS from 20 October 2027 | 30 April 2029 |
Sources: the Node.js release schedule and previous releases pages. Latest releases at the time of writing: 22.23.5, 24.22.3 and 26.13.1.
- What the phases mean. Active LTS gets bug fixes and audited new features; Maintenance LTS gets critical fixes and security updates only. Node.js says production apps should run only these two.
- The schedule changes after 26. The project announced that from Node.js 27 there is one major a year, in April, and every release becomes LTS: six months of Alpha builds for library authors, six months as Current, then 30 months of LTS. Node.js 27 is due on 22 April 2027 and ends on 30 April 2030; 26 is the last line on the old schedule.
- What that means for your choice: little, if you run LTS releases only. There is still one new LTS line a year; keep Alpha builds out of production.
Should you upgrade to Node.js 22, 24 or 26?
Node.js 24, for most teams. It is supported until 30 April 2028 and is the newest line every major host runs in production.
| Node.js 22 | Node.js 24 | Node.js 26 | |
|---|---|---|---|
| Support ends | 30 April 2027 | 30 April 2028 | 30 April 2029 |
| Phase on 22 November 2026 | Maintenance LTS | Maintenance LTS | Active LTS |
| AWS Lambda | nodejs22.x, updates blocked from 31 August 2027 |
nodejs24.x, updates blocked from 1 July 2028 |
nodejs26.x, public preview only |
Docker node:<version>-slim |
Debian bookworm | Debian bookworm | Debian trixie |
| Changes from 20 (below) | assert imports, crypto.createCipher() removed |
22's, plus util.is* removed, url.parse() warnings, short keys rejected |
24's, plus SlowBuffer and rmdir recursive removed, HTTP/2 fetch |
Sources: the Node.js release schedule, AWS's Lambda runtimes and the Docker official images.
Why 24:
- It runs everywhere in production: AWS Lambda, Google Cloud Run functions, Vercel and the official Docker images. Node.js 26 is still a preview on Lambda and Cloud Run functions.
- Your frameworks support it, including Angular 22 and Vitest 5, which no longer run on 20.
- The image change is Node.js alone:
node:24-slimstays on Debian bookworm, likenode:20-slim.
When 26 is the better choice: when you run your own containers or servers, or deploy to Vercel, where 26 is the default, and your tests pass on it. You get a year more support for a few more changes (below).
When 22 makes sense: only as a stop, while a dependency you cannot replace does not yet run on 24. On Lambda it buys no time: nodejs22.x blocks updates on 31 August 2027, the same day as nodejs20.x.
Which hosting deadlines force your date?
Your host's dates decide when you must move. On AWS Lambda:
| Runtime | Deprecated | Blocks new functions | Blocks updates |
|---|---|---|---|
nodejs20.x |
30 April 2026 | 29 July 2027 | 31 August 2027 |
nodejs22.x |
30 May 2027 | 29 July 2027 | 31 August 2027 |
nodejs24.x |
30 April 2028 | 1 June 2028 | 1 July 2028 |
nodejs26.x (preview) |
30 April 2029 | 1 June 2029 | 1 July 2029 |
Sources: AWS's Lambda runtimes and runtime deprecation pages.
- Deprecated is not switched off. AWS may stop patching the runtime and its functions lose technical support, but they keep running. Until the block dates, the CLI, SAM and CloudFormation (not the console) can still create and update them.
nodejs26.xis a preview. It has been a public preview since 25 August 2026, which AWS says is not for production. The runtimes page gives November 2026 as its target month.
Two other hosts have already passed their Node.js 20 dates:
- Google Cloud Run functions decommissioned
nodejs20on 30 October 2026: you can no longer create or update functions on it, and functions left on it may be disabled.nodejs22follows on 31 October 2027 andnodejs24on 31 October 2028;nodejs26is in preview. - Vercel stopped accepting new deployments of projects still set to Node.js 20 on 1 October 2026; existing deployments keep running. Node.js 26 became the default on 29 October 2026, and a project whose
enginesallows 26, such as>=20, moves to it on its next deployment.
Do Next.js, Angular, Vite, NestJS, Express and Prisma support Node.js 24 and 26?
Yes, in their latest releases. This is the engines field each one publishes on npm, checked on 22 November 2026:
| Package (latest release) | Node.js 20 | Node.js 24 | Node.js 26 |
|---|---|---|---|
| Next.js 16.4.6 | 20.9.0 or later | Yes | Yes |
| Angular 22.3.0 | No | 24.15.0 or later | Yes |
| Angular 21.2.26 (LTS) | 20.19.0 or later | Yes | Yes |
| Vite 8.3.8 | 20.19.0 or later | Yes | Yes |
| Vitest 5.1.1 | No | Yes | Yes |
| NestJS 12.6.0 | Yes | Yes | Yes |
| Express 5.3.0 | Yes | Yes | Yes |
| Prisma 7.10.1 | 20.19 or later | Yes | Yes |
| TypeScript 7.0.2 | Yes | Yes | Yes |
- Minimums sit on minor releases. Vite and Prisma need 20.19 or later, and Angular 22 needs 24.15.0 or later, so use the latest release of the line you pick.
- Prisma 8 drops Node.js 20. Its release candidates need 22.18, 24.11 or 26, and npm's
latesttag for theprismaCLI pointed at one (8.0.0-rc.34) when we checked, so pin the version you mean. - Angular apps: our Angular 20 upgrade guide covers Angular's own steps.
What breaks when you upgrade from Node.js 20 to 24 or 26?
You do not need to stop at 22, but every change from 22 onward arrives at once. These are the six most likely to reach application code; the full list is on the deprecations page.
| Change | 22 | 24 | 26 |
|---|---|---|---|
util.isString() and the other util.is* checks except isArray() |
Warns | Removed | Removed |
crypto.createCipher() |
Removed | Removed | Removed |
SlowBuffer |
Works | Warns | Removed |
fs.rmdir(path, { recursive: true }) |
Warns | Warns | Throws |
url.parse() in your own code |
Works | Warns | Warns |
JSON imports with assert { type: 'json' } |
Syntax error | Syntax error | Syntax error |
| TLS with RSA keys under 2048 bits | Works | Rejected | Rejected |
| Native addons not built on Node-API | Rebuild | Rebuild | Rebuild |
fetch() against HTTP/2 servers |
HTTP/1.1 | HTTP/1.1 | HTTP/2, empty statusText |
Removed APIs: util.is*, SlowBuffer, fs.rmdir and url.parse
Node.js usually warns before removing an API, but most of these warnings start after 20: util.is* in 22, SlowBuffer and url.parse() in 24. url.parse() still works on 26 and warns only when your own code calls it, not code inside node_modules. crypto.createCipher(), which already warned on 20, is gone from 22. Its replacement, createCipheriv() with a key from crypto.scrypt(), encrypts differently, so plan how to read data written the old way before you switch.
const fs = require('node:fs');
const url = require('node:url');
const util = require('node:util');
const { SlowBuffer } = require('node:buffer');
const name = 'order-42';
const link = 'https://shop.example.com/orders?id=42';
// Before: each line runs on Node.js 20.20.2. On the newer versions:
util.isString(name); // 22.23.5 warns (DEP0056); 24.22.3 and 26.13.1: TypeError
SlowBuffer(16); // 24.22.3 warns (DEP0030); 26.13.1: TypeError
fs.rmdirSync('build-tmp', { recursive: true }); // 20, 22 and 24 warn (DEP0147); 26.13.1: ERR_INVALID_ARG_VALUE
url.parse(link, true).query.id; // 24.22.3 and 26.13.1 warn (DEP0169), in your own code only
// After: no warnings on 20.20.2, 22.23.5, 24.22.3 or 26.13.1
typeof name === 'string';
Buffer.allocUnsafeSlow(16);
fs.rmSync('build-tmp', { recursive: true, force: true });
new URL(link).searchParams.get('id');Import assertions: assert becomes with
Node.js 22 dropped import assertions. JSON imports written with assert no longer parse, so the module fails to load at all. The import attributes form, with, works on all four versions, so you can switch while still on 20.
// Before: runs on Node.js 20.20.2 with a V8 warning; on 22.23.5, 24.22.3 and 26.13.1:
// SyntaxError: Unexpected identifier 'assert'
import config from './config.json' assert { type: 'json' };
// After: import attributes, which run on all four versions
import config from './config.json' with { type: 'json' };require(esm): on by default, but off on Lambda and Vercel
Since Node.js 20.19.0 and 22.12.0, require() can load an ES module without a flag (22.12.0 notes), so CommonJS code that requires an ESM-only package runs on your laptop. AWS Lambda turns it off on nodejs20.x, nodejs22.x and nodejs24.x, and Vercel does the same by default, so the same code fails there with ERR_REQUIRE_ESM. A module that uses top-level await cannot be required anywhere (ERR_REQUIRE_ASYNC_MODULE). Use import(), and run your tests with the flag your host sets.
// app.cjs: CommonJS code that loads an ESM-only package.
// Runs on Node.js 20.20.2, 22.23.5, 24.22.3 and 26.13.1. With the flag Lambda sets,
// node --no-experimental-require-module app.cjs, it fails on all four:
// Error [ERR_REQUIRE_ESM]: require() of ES Module .../esm-only/index.js from .../app.cjs not supported.
const { slugify } = require('esm-only');
console.log(slugify('Spring Sale 2026'));
// After: import() loads it on all four, with or without the flag
async function main() {
const { slugify } = await import('esm-only');
console.log(slugify('Spring Sale 2026'));
}
main();OpenSSL 3.5: short keys rejected from Node.js 24
Node.js 22 (from 22.20.0) and 24 both bundle OpenSSL 3.5, but with different defaults: the TLS docs give a security level of 1 on 22 and 2 on 24. Level 2 prohibits RSA, DSA and DH keys shorter than 2048 bits. A Node.js 24 server with such a key fails to start with ee key too small, and a client refuses a server that presents one. Look for it in connections to older internal services, databases and partner endpoints.
const tls = require('node:tls');
const fs = require('node:fs');
// Before: an older internal service still presents a 1024-bit RSA certificate.
// Prints "connected" on Node.js 20.20.2 and 22.23.5; on 24.22.3 and 26.13.1:
// EE certificate key too weak
const socket = tls.connect({ host: 'localhost', port: 9443, ca: fs.readFileSync('legacy-cert.pem') });
socket.on('secureConnect', () => { console.log('connected'); socket.end(); });
socket.on('error', (err) => console.error(err.message));
// Fix: reissue the service's certificate with a 2048-bit RSA key; then this connects on all four.
// Stopgap for this one connection only, while that happens:
// tls.connect({ host: 'localhost', port: 9443, ca: fs.readFileSync('legacy-cert.pem'), ciphers: 'DEFAULT@SECLEVEL=1' })Native addons need a rebuild
Each major has its own ABI number, NODE_MODULE_VERSION, and an addon compiled for one does not load on another. The exception is an addon built on Node-API, which is stable across versions: in our test, a Node-API addon built on 20 loaded on all four. It bites when node_modules is copied from an old image or a CI cache is restored across versions.
# The ABI number each version expects:
# 115 on Node.js 20.20.2, 127 on 22.23.5, 137 on 24.22.3, 147 on 26.13.1
node -p process.versions.modules
# Find the native addons in your dependency tree
find node_modules -name '*.node' -not -path '*/node-gyp/*'
# An addon compiled on 20.20.2 (not built on Node-API) fails on 24.22.3:
# Error: The module '.../hello.node' was compiled against a different Node.js version using
# NODE_MODULE_VERSION 115. This version of Node.js requires NODE_MODULE_VERSION 137.
# Fix: rebuild on the new version, or install from scratch inside the new image
npm rebuild
npm ciNode.js 26 only: fetch speaks HTTP/2
Node.js 26 ships Undici 8, which turns on HTTP/2 by default. The built-in fetch now negotiates HTTP/2 with servers that offer it, and HTTP/2 responses have an empty statusText, as Vercel's docs also note. Check status or ok instead. Node.js 26 also warns when code calls module.register() to add module hooks (DEP0205); the replacement is module.registerHooks().
// Before: passes on Node.js 20.20.2, 22.23.5 and 24.22.3. On 26.13.1, fetch speaks HTTP/2
// to nodejs.org, statusText is '' and this throws "Request failed: "
const res = await fetch('https://nodejs.org/dist/index.json', { method: 'HEAD' });
if (res.statusText !== 'OK') throw new Error(`Request failed: ${res.statusText}`);
// After: check the status code, which HTTP/1.1 and HTTP/2 both set. Passes on all four.
if (!res.ok) throw new Error(`Request failed with status ${res.status}`);How do you check your app before upgrading?
Find where the version is set, then let a clean install and the test suite find the rest.
- List every place Node.js runs:
.nvmrcor.node-version,enginesinpackage.json, DockerfileFROMlines, CI matrices, Lambda runtimes and host settings. - See how far behind your dependencies are with
npm lsandnpm outdated. - Find native addons: anything that ships a
.nodefile. - Install cleanly on the new version.
npm ciprintsEBADENGINEfor every package whoseenginesfield rules it out, your own included. - Run the tests with deprecations as errors.
--throw-deprecationfails on the first warning;--trace-deprecationshows the line behind each. For a warning inside a package, upgrade the package. - Reach the code the tests miss: scheduled jobs, queue workers and build scripts.
# 1. Where the Node.js version is pinned
cat .nvmrc .node-version 2>/dev/null
grep -n -A2 '"engines"' package.json
grep -rn --include='Dockerfile*' '^FROM node' .
grep -rn 'node-version' .github/workflows/
# 2. What you depend on, and how far behind it is
npm ls --depth=0
npm outdated
# 3. Native addons, which must be rebuilt on the new version
find node_modules -name '*.node' -not -path '*/node-gyp/*'
# 4. On the new version: a clean install warns (EBADENGINE) about every package that rules it out
npm ci
# 5. On the new version: tests with deprecations as errors, then the stack of each warning
NODE_OPTIONS=--throw-deprecation npm test
NODE_OPTIONS=--trace-deprecation npm testWhat is a safe upgrade path from Node.js 20, with a way back?
- Get clean on 20 first. Move to 20.20.2 and fix every deprecation warning your own code raises there, while nothing else changes.
- Upgrade the packages that need it, still on 20.
- Run CI on both versions. Add 24 beside 20 and widen
enginesto"20.x || 24.x". - Build an image that changes only Node.js.
node:24-slimkeeps the Debian bookworm ofnode:20-slim. For 26, start onnode:26-bookworm-slimand move to trixie separately. - Install inside the image with
npm ci, so native addons are built for the new version. - Ship one service first, such as a worker, and watch errors, memory and response times for a few days.
- Then tidy up: set
enginesto"24.x"and.nvmrcto24, drop 20 from CI, and move Lambda functions tonodejs24.x. Naming the major also stops a host such as Vercel moving you to a newer one.
# Before
# FROM node:20-slim
# After: node:24-slim is Debian bookworm, like node:20-slim (node:26-slim is Debian trixie)
FROM node:24-slim
WORKDIR /app
COPY package.json package-lock.json ./
# Install inside the image, so native addons are built for this Node.js version
RUN npm ci --omit=dev
COPY . .
CMD ["node", "server.js"]# .github/workflows/tests.yml
name: tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Keep 20 only until the switch, then drop it
node-version: [20, 24]
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm ci
- run: npm test
env:
NODE_OPTIONS: --throw-deprecationHow do you roll back if the upgrade goes wrong?
A Node.js upgrade does not migrate your data, so going back is a redeploy, as long as you keep it that simple.
- Ship the Node.js change on its own, with no framework or Debian upgrade in the same release.
- Keep the code running on both versions until you are sure: 20 stays in CI and in
engines. - Keep the last Node.js 20 image tagged, and know the command that redeploys it.
- On Lambda, point an alias at a published version, so going back means moving the alias. AWS recommends this, and warns that rolling back to a deprecated runtime may be blocked once updates are: from 31 August 2027 for
nodejs20.x. - Agree in advance what sends you back, such as a rise in errors, and who makes the call.
How we approach it at MicroPyramid
If you would rather hand this over, we run Node.js upgrades as a fixed-scope project. It starts with an Upgrade Assessment: everywhere Node.js runs, what blocks 24 or 26, and the order to move in. Then we do the upgrade, with CI on both versions, one service first and a way back, and hand it back with notes on what changed. To stay on supported versions afterwards, our software maintenance is an optional monthly retainer, month to month. The end-of-life checker shows what is out of support first. Still on Node.js 20? Tell us what you run and we will show you what the path to 24 looks like for your app.
Frequently Asked Questions
When did Node.js 20 reach end of life?
On 30 April 2026. Its final release is 20.20.2, from 24 March 2026, and it gets no more fixes, including security fixes. Node.js 22 follows on 30 April 2027.
Should we upgrade from Node.js 20 to 22, 24 or 26?
To 24 for most teams: it is supported until 30 April 2028 and runs in production on AWS Lambda, Google Cloud Run functions, Vercel and the official Docker images. Choose 26, supported until 30 April 2029, when your platform runs it in production and your tests pass on it. Use 22 only as a short stop.
Can we go straight from Node.js 20 to 24 or 26?
Yes. Node.js does not require a stop at each major, but the removals in between arrive together, so run the tests on the target with --throw-deprecation.
What happens to Node.js 20 functions on AWS Lambda?
They keep running, but nodejs20.x has been deprecated since 30 April 2026, so AWS may no longer patch it. Lambda blocks creating nodejs20.x functions from 29 July 2027 and updating them from 31 August 2027, the same dates as nodejs22.x.
Is Node.js 26 ready for production?
The Node.js project says so: 26 has been Active LTS since 28 October 2026. Vercel made it the default, but on AWS Lambda and Google Cloud Run functions it was still a preview on 22 November 2026.
What breaks most often between Node.js 20 and 24?
Removed util.is* type checks and crypto.createCipher(), JSON imports written with assert, TLS with RSA keys shorter than 2048 bits, native addons that were not rebuilt, and new warnings from url.parse() and SlowBuffer.
How does the new Node.js release schedule change the choice?
From Node.js 27, there is one major release a year and every one becomes LTS, with 36 months from its first Current release to end of life. Node.js 26 is the last line on the old schedule; 27 arrives in April 2027 and enters LTS in October 2027. If you only run LTS releases, the choice works as before: one new LTS line a year.