News Reader's article

Node.js 26 LTS: what to check before upgrading from 22 or 24

Node.js 26 became Active LTS on 28 October 2026 and is supported until April 2029. Node 24 is already in maintenance, Node 22 has until April 2027. Here is what changes for application code, what can break, and a test plan that fits into one sprint.

The authors' opinion may differ from the editorial position

YS 4 min read

Where each line stands

LineStatusUntil
20.xend of life—
22.xMaintenance30.04.2027
24.xMaintenance since 20.10.2026per the Release schedule
26.xActive LTS since 28.10.2026 (v26.13.0)30.04.2029

The schedule also changes from the next major: starting with Node 27 there is one major a year, and each of them becomes LTS. The odd/even rule many teams have in their upgrade docs no longer applies after 26.

If you are on 20, you are already running an unsupported runtime; that is the first thing to fix, independent of everything below.

What is new and worth using

Temporal is on by default. The date and time API that replaces most uses of Date and of libraries such as moment:

const now = Temporal.Now.zonedDateTimeISO("Asia/Tbilisi");
const due = now.add({ days: 30 }).toPlainDate();
console.log(due.toString()); // e.g. 2026-12-04

const a = Temporal.PlainDate.from("2026-10-28");
const b = Temporal.PlainDate.from("2029-04-30");
console.log(a.until(b, { largestUnit: "months" }).months);

If your code loads a Temporal polyfill, check that it does not overwrite the built-in globalThis.Temporal, or remove it.

V8 14.6 brings Map.prototype.getOrInsert and Iterator.concat:

const byUser = new Map();
for (const e of events) byUser.getOrInsert(e.userId, []).push(e);

for (const x of Iterator.concat(firstPage, secondPage)) handle(x);

Undici 8 is the engine behind fetch. If you configure agents, dispatchers or interceptors directly, read the Undici 8 changes; plain fetch() calls are usually unaffected.

What can break

--experimental-transform-types is gone

Type stripping stays (default since 22.18, stable since 24.12), but the flag that also transformed TypeScript-only syntax was removed. Node only erases types. That means no enum, no namespace with values, no parameter properties, no decorators, no .tsx, and tsconfig.json is not read at all.

The TypeScript compiler can tell you in advance what would fail:

{
  "compilerOptions": {
    "erasableSyntaxOnly": true,
    "verbatimModuleSyntax": true,
    "noEmit": true
  }
}

Run tsc with this, fix the errors (an enum usually becomes an as const object), and the same files will run under node file.ts.

module.register() is deprecated

Custom loaders registered with module.register() still work but print a deprecation warning. The direction is the synchronous module.registerHooks(). If you use a tool that registers hooks for you (test runners, TS loaders, APM agents), check its release notes for Node 26 support before upgrading.

node --trace-deprecation app.js 2>&1 | grep -i deprecat

Permission Model: update, then rely on it

The Permission Model (--permission with --allow-fs-read, --allow-fs-write and others) is useful as a seat belt. The July 2026 security release fixed CVE-2026-58043, a bypass of --allow-fs-*. If you depend on these flags, run a patched release, and remember the Node docs themselves say the model does not protect against malicious code.

node --permission --allow-fs-read=/srv/app --allow-fs-write=/srv/app/tmp server.js

Test plan

  1. Pin the version in .nvmrc / engines and in the CI matrix: run 24 and 26 side by side for a while.
  2. Run the full test suite with --trace-deprecation and collect every warning.
  3. Run tsc with erasableSyntaxOnly if you execute .ts directly.
  4. Rebuild native addons (npm rebuild) and check prebuilt binaries exist for 26.
  5. Check your loaders, APM agent and test runner for Node 26 support.
  6. If you use fetch with custom dispatchers, add an integration test against a real endpoint.
  7. Deploy to one instance first, compare memory and latency, then roll out.

One date to keep in mind: Node.js announced security releases for 11 November 2026. If you upgrade this week, plan to take that patch right after.

Sources

Comments 7

SL Sara L. #3

We run our API with ts-node and we have enums all over the place 🙂 Is it realistic to move to plain node file.ts, or should we just keep compiling with tsc?

YS Yury Slinkin #4

>>3
Both are fine. Compiling with tsc to JavaScript keeps working on 26 and does not depend on type stripping at all. If you want node file.ts, turn on erasableSyntaxOnly first and see how many errors you get. Enums usually convert to as const objects mechanically, but do it as a separate change, not together with the runtime upgrade.

5 more in other languages
МР Михаил Р. #1

По Permission Model. Имеет смысл включать его в проде для обычного HTTP-сервиса, или это скорее для CLI-утилит и скриптов? Интересует накладной расход на проверки при чтении файлов.

YS Yury Slinkin #2

>>1
Для сервиса имеет смысл как дополнительный слой: если в зависимости окажется код, который полезет читать ~/.ssh или писать вне каталога приложения, он упрётся в запрет. Но основная изоляция остаётся на уровне контейнера и пользователя ОС. Цифр по накладным расходам в официальных источниках нет, поэтому лучше замерить на своём профиле нагрузки: тот же нагрузочный тест с --permission и без. И обязательно на версии с исправлением CVE-2026-58043.

I ilya #5

а с 22 прыгать сразу на 26 норм или лучше через 24 чтобы ловить поломки по одной

ER Evgeny Rudenko #6

>>5
Промежуточная остановка на 24 сама по себе ничего не ловит, ломается то же самое, просто в два захода. Практичнее сразу 26, но с матрицей в CI: 22 (текущий прод) и 26 параллельно, и список предупреждений из --trace-deprecation на 22 разобрать до переключения. В проде я бы не стал совмещать переход с обновлением крупных зависимостей.

YS Yury Slinkin #7

>>5 >>6
Согласен. Добавлю только про сроки: 11.11 выходят релизы безопасности, так что первую выкатку на 26 удобно делать уже на этом патче, а не за пару дней до него.

Sign in to comment