# Node 26 is LTS. Half of what broke came from a release you skipped.

- Published: 2026-10-31
- Updated: 2026-11-26
- Tags: Node.js, Tooling
- URL: https://devtrillo.com/writing/node-26-lts-upgrade/

This blog built on Node 26.12.0 on the first try. Fifty pages, exit 0, not one `(node:…)` warning in the log. Then I pulled the official Docker image:

```text title="docker run --rm node:26-alpine"
$ node -v
v26.12.0
$ corepack enable
sh: corepack: not found
$ which yarn pnpm
$                                  # nothing
```

Same command on `node:24-alpine` prints corepack 0.36.0, and `/usr/local/bin/yarn` is right there. Any Dockerfile with `RUN corepack enable` stops at that line.

That one isn't new in 26. Corepack left in Node 25, the odd release that was supported for about seven months and that most teams never installed. If you're on 24, upgrading to 26 means taking two majors at once, and half of what broke for me shipped in the one you skipped.

## Why now

Node 26 moved to Active LTS on October 28, and Node 24 went into maintenance on October 20.  This is the week most teams pick the new line.

To see where you are, ask the binary:

```bash title="which release am I on?"
node -p process.release
# lts: '<codename>' appears once you're on a 26.x LTS build
```

`process.release.lts` is only set on LTS builds. Everything I tested below ran on 26.12.0, a Current release from October 14. The first 26.x LTS release is listed in [nodejs.org/dist/index.json](https://nodejs.org/dist/index.json), with its `lts` field set to the codename.

## Two majors, one upgrade

The changelogs for [25.0.0](https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V25.md#25.0.0) and [26.0.0](https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V26.md#26.0.0) are long. These are the lines that hit something in my tests:

| Change                                             | Landed in |
| -------------------------------------------------- | --------- |
| Corepack no longer shipped                         | 25.0.0    |
| `localStorage` global on by default                | 25.0.0    |
| `fs.F_OK`, `SlowBuffer`, `assert.CallTracker` gone | 25.0.0    |
| `localStorage` is `undefined` without a file       | 26.0.0    |
| `--experimental-transform-types` removed           | 26.0.0    |
| `_stream_*` modules and `writeHeader()` removed    | 26.0.0    |
| `module.register()` deprecated (DEP0205)           | 26.0.0    |
| `NODE_MODULE_VERSION` 137 (24) → 147 (26)          | both      |

## Corepack is gone

The 25.0.0 changelog gives it one line: "build: stop distributing Corepack". If your `package.json` has a `packageManager` field and your CI or Dockerfile runs `corepack enable`, that step fails on 26.

The fix is to get your package manager some other way: install it with `npm install -g`, or install Corepack itself from npm before you enable it. I didn't test either inside the image. Either way it's one more line in the Dockerfile, and you only find out you need it when the build stops.

## Native add-ons: some of them

The add-on ABI moves every major. `process.versions.modules` is 137 on Node 24 and 147 on 26. I installed `better-sqlite3` under 24 and started the same tree on 26:

```text title="node t.cjs on 26.12.0"
Error: The module '…/better_sqlite3.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 137. This version of Node.js requires
NODE_MODULE_VERSION 147. Please try re-compiling or re-installing
```

But this blog's tree has six native binaries (lightningcss, rolldown, the Astro compiler, sharp, satteri and fsevents), and none of them noticed. They're built on Node-API, which stays the same across majors. `better-sqlite3` is compiled against V8's C++ API, so it's tied to one ABI number.

The fix is a rebuild:

```text title="npm rebuild better-sqlite3 (npm 11.20.0)"
rebuilt dependencies successfully
npm warn rebuild 1 package has install scripts not yet covered by allowScripts.
Run `npm install-scripts ls` to review.
```

It compiled from source and took about two minutes on my machine. After that it loaded fine.

Read that warning before you skip past it. Node 26.12.0 still ships npm 11.20.0, but npm's `latest` tag is 12.2.0, and [npm 12](https://github.blog/changelog/2026-06-09-upcoming-breaking-changes-for-npm-v12/) turns `allowScripts` off by default. Dependency install scripts don't run, and packages with a `binding.gyp` don't get their implicit node-gyp build either. The add-ons you have to rebuild for 26 are exactly the packages npm 12 refuses to build until you approve them. Run `npm install-scripts ls` now, while it's a warning.

If all you need is SQLite, Node 26 has it built in. `DatabaseSync` from `node:sqlite` worked on 26.12.0 with SQLite 3.54.0 and nothing to compile.

**Quiz:** Your service runs on Node 24 with better-sqlite3 and sharp, both installed from prebuilt binaries. You switch the base image to Node 26 without reinstalling. What happens?

- Both crash on load with a NODE_MODULE_VERSION mismatch
- Only better-sqlite3 crashes; sharp keeps working
- Neither crashes; Node 26 recompiles add-ons on first load

**Answer:** Only better-sqlite3 crashes; sharp keeps working — better-sqlite3 was compiled for NODE_MODULE_VERSION 137 and 26 wants 147. sharp talks to Node-API, so it loads as before.

- Not "Both crash on load with a NODE_MODULE_VERSION mismatch": sharp uses Node-API, which doesn't change between majors. Only add-ons built on V8 directly are tied to the ABI number.
- Not "Neither crashes; Node 26 recompiles add-ons on first load": Node never recompiles anything. You run npm rebuild, and on npm 12 you approve the package in allowScripts first.

## TypeScript enums under plain `node`

Running `.ts` files straight with `node` works on both versions, as long as the types can be erased. The flag that handled the rest is gone. Here's a two-line file with an `enum`:

```text title="node --experimental-transform-types enum.ts"
# Node 24.16.0
enum ok 1                      # plus an ExperimentalWarning

# Node 26.12.0
node: bad option: --experimental-transform-types
```

On 26 the process exits before it runs a line. Drop the flag and you get the real reason:

```text title="node enum.ts on 26.12.0"
SyntaxError [ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX]: TypeScript enum is not supported in strip-only mode
```

Type stripping is stable since 24.12, so `node file.ts` is here to stay. What it won't do is generate code, and an `enum` is code. Set `erasableSyntaxOnly` in `tsconfig.json` so the compiler flags these before Node does, and swap the enum for an object:

**Rewrite a TypeScript enum as an as-const object**

Before:

```ts
enum Color {
  Red,
  Green,
}

console.log(Color.Green);
```

After:

```ts
const Color = {
Red: 0,
Green: 1,
} as const;
type Color = (typeof Color)[keyof typeof Color];

console.log(Color.Green);
```

The same goes for `namespace` and parameter properties. If you'd rather keep them, [the Node docs](https://github.com/nodejs/node/blob/v26.12.0/doc/api/typescript.md) point to `tsx`, or keep a build step. I compared what each TypeScript setup accepts in [the TypeScript 7 side-by-side post](/writing/typescript-7-side-by-side/).

## `localStorage` is there, and it isn't

On Node 24, `localStorage` didn't exist without `--experimental-webstorage`. Node 25 turned it on. Node 26 keeps the global but leaves it empty unless you give it a file:

```text title="Node 26.12.0, no flags"
> 'localStorage' in globalThis
true
> typeof localStorage
'undefined'
> localStorage.setItem('n', '1')
TypeError: Cannot read properties of undefined (reading 'setItem')
```

It also prints `ExperimentalWarning: localStorage is not available because --localstorage-file was not provided.` With `--localstorage-file=ls.db` it works and persists across runs.

The trap is shared code that sniffs for a browser. `'localStorage' in globalThis` was `false` on 24 and is `true` on 26, so the server takes the browser branch and throws on the first call. Check `typeof window` instead, or at least `typeof localStorage !== 'undefined'`.

## The quieter ones

These didn't break my build, but they're worth a search:

- `module.register()` still works on 26 but prints `[DEP0205] DeprecationWarning`. The replacement, `module.registerHooks()`, is marked "Release candidate" in the 26.12.0 docs, not stable. I'd move to it, but test it like any other RC.
- `fs.F_OK` is `undefined` on 26, with no warning. On 24 it was `0` plus a DEP0176 warning. So `fs.accessSync(p, fs.F_OK)` now passes `undefined` and says nothing. Use `fs.constants.F_OK`.
- `require('_stream_readable')` and its siblings throw `MODULE_NOT_FOUND`. `ServerResponse.prototype.writeHeader` is `undefined`, so use `writeHead()`.
- Crypto: short GCM auth tags now need an explicit `authTagLength`. Passing a `CryptoKey` to `node:crypto` APIs (DEP0203) is deprecated in 26 and already marked end-of-life in the main-branch docs, so expect it gone in 27.

Here's the grep I'd run before the upgrade. It's built from the list above, so it only finds what I knew to look for:

```bash title="find the 24 → 26 breaks"
rg -n "experimental-transform-types|module\.register\(|_stream_(readable|writable|duplex|transform|passthrough|wrap)|\.writeHeader\(|fs\.[FRWX]_OK|SlowBuffer|CallTracker|multipleResolves|corepack|'localStorage' in|authTagLength"

# TS syntax that bare `node` can't run
rg -n "^\s*(export\s+)?(const\s+)?enum\s|^\s*namespace\s" --type ts

# add-ons tied to the ABI
npm ls --all | grep -iE "nan|node-gyp"; find node_modules -name "*.node"
```

The rest is in the two changelogs. Read the "semver-major" sections, not all of it.

## What you get for it

Temporal is on by default, along with two V8 additions I'd been polyfilling:

```js title="node features.mjs on 26.12.0"
Temporal.PlainDate.from("2026-01-31").add({ months: 1 }).toString();
// '2026-02-28'

const groups = new Map();
groups.getOrInsertComputed("k", () => []).push(1);
groups.getOrInsertComputed("k", () => []).push(2);
groups.get("k"); // [ 1, 2 ]

[...Iterator.concat([1, 2], new Set([3]))]; // [ 1, 2, 3 ]
```

On 24 all three are `not defined` or `not a function`. And since `Temporal` is now a global, Vitest 5's fake timers fake it. In [the Vitest 5 post](/writing/upgrading-to-vitest-5/) I wrote that nothing changed for me because Node 24 had no `Temporal`. On 26 that's no longer true, so add `Temporal` to `toNotFake` if a test needs the real clock.

## Every release is LTS now

Node 26 is the last line picked by the old odd/even rule. From 27 on, the [new schedule](https://nodejs.org/en/blog/announcements/evolving-the-nodejs-release-schedule) gives each major six months of Alpha, six months of Current and 30 months of LTS. One major a year, numbered after the year it goes Current: 27.0.0 in 2027, 28.0.0 in 2028. The Node team's reason is blunt: "Odd-numbered releases see minimal adoption."

Pick a date and see which lines are supported:

**Node.js release lines 22 to 28 on a timeline**

- Node 22: Current Apr 2024, LTS Oct 2024, end of life Apr 2027
- Node 24: Current May 2025, LTS Oct 2025, maintenance Oct 2026, end of life Apr 2028
- Node 25: Current Oct 2025, end of life Jun 2026, never LTS
- Node 26: Current May 2026, LTS Oct 2026, end of life Apr 2029
- Node 27: Alpha Oct 2026, Current Apr 2027, LTS Oct 2027, end of life Apr 2030
- Node 28: Projected from the announced model: Alpha Oct 2027, Current Apr 2028, LTS Oct 2028

Supported in:

- **Oct 2026:** 22, 24 and 26. 22 and 24 are in maintenance, 26 is the new LTS, 25 is already gone. 27's Alpha is scheduled to open on the same day 26 goes LTS.
- **Oct 2027:** 24, 26 and 27. 22 ended in April. 27 is the first odd line to reach LTS, and 28 would be in Alpha.
- **Oct 2028:** 26, 27 and 28 if the model holds. 24 ended in April. Never more than three at once.

Compare 25 and 27. Under the old model, 25 lived for about seven months and never got LTS. Under the new one, 27 gets the same full bar as 26. Alpha is where semver-major changes still land, so it's for testing, not production. 27's Alpha was scheduled to open on October 28, tagged like `27.0.0-alpha.1`.  27.0.0 itself is scheduled for April 22, 2027.

> **Note:** The announcement says "This schedule is not final and may be amended." The bar
> for 28 isn't in the schedule file yet. I drew it from the announced model.

## An upgrade policy for small teams

With a new line every year, each supported for 36 months, the policy fits in four lines:

1. Move to each new major when it goes LTS in October.
2. Run CI against the current Alpha as a job that's allowed to fail, so the next October has no surprises.
3. Never sit on a line past its maintenance end date.
4. Skipping a year is allowed. At most three lines are supported at once.

Skipping still costs something. The next jump carries two majors of changes, which is what this whole post is about.

## What I changed

On this blog, nothing. It runs on Bun locally and in CI, the Astro build passed on 26.12.0 with no warnings, and every native binary in its tree is Node-API. I only ran the Astro CLI under Node 26, not the rest of the scripts, and I haven't moved CI.

The breaks I found were in the corners: a Dockerfile that runs `corepack enable`, a service with a V8 add-on, a script that runs an `enum` with bare `node`, and a "browser or server" check. If you have one of those, each fix is small. Find them with the grep before your base image finds them for you.
