Skip to content
< samuelsantana.dev />
Back to the Blogread() in a loop over a, b and c: one chunk ["abc"] on Node 24.19.0, three chunks ["a","b","c"] on Node 26.13.0.

Node 24 to Node 26 Upgrade in a NestJS API: What Actually Changes

Samuel Santana
Published on October 30, 2026
NodeJSNestJSAmazon Web Services

I swapped Node 24 for 26.13.0 in the two NestJS APIs I run in production, the one behind this blog (vertex-api) and the one behind Pyxis (pyxis-api), and ran every test they have. Everything passed without changing a line: 248 unit tests and 65 end-to-end tests in one; 2,600 unit, 373 integration and 228 end-to-end tests in the other. Both boot, answer on /health and print no deprecation warning at all, not even with --pending-deprecation.

Neither of them is moving to Node 26 this week. Both run on AWS Lambda, and the nodejs26.x runtime is still a preview that AWS itself says not to use in production.

And a green suite proves less than it looks like. Between 24 and 26, read() on a Readable started returning something else and fetch started speaking a different protocol. None of my tests cover that, because none of my code depends on it. Yours might.

What Goes Away Between 24 and 26, and What 24 Warns About First

The 26.0.0 changelog, from May 5, 2026, lists three removals that show up in every summary: the internal _stream_* modules, the HTTP response's writeHeader(), and the --experimental-transform-types flag. Moving off 24 also means taking on the 25.0.0 removals, from a release that LTS-only teams never ran. I ran each item on 24.19.0 to see whether it warns before it breaks:

What goes awayCodeRemoved inDoes Node 24 warn at runtime?
require('_stream_readable') and the other _stream_*DEP019326no (only _stream_wrap, through DEP0125)
res.writeHeader()DEP006326no, not even with --pending-deprecation
--experimental-transform-typesflag26no
SlowBufferDEP003025only when something calls SlowBuffer()
fs.F_OK, fs.R_OK, fs.W_OK, fs.X_OKDEP017625yes
fs.rmdir(path, { recursive: true })DEP014725yes
Corepack bundled with Node25not applicable

The full list is on the Deprecated APIs page. It says DEP0193 became a runtime warning in 24.2.0, but on 24.19.0 require('_stream_readable') loads silently, and the same page in the 24.19.0 docs marks it as documentation-only. I'd trust what the process prints, not the table.

On 26, the first two fail like this:

$ node -e "require('_stream_readable')"
Error: Cannot find module '_stream_readable'
  code: 'MODULE_NOT_FOUND',

$ node --experimental-transform-types -e "1"
...\node.exe: bad option: --experimental-transform-types

And an HTTP server that calls res.writeHeader(200) responds normally on 24, with no warning, and throws TypeError: res.writeHeader is not a function on the first request on 26. The flag is the sneaky one, because it doesn't break a route: it stops the process from starting. In a NestJS API it's unlikely to be in application code (Node's native TypeScript support doesn't transform decorators, so a Nest app never ran through it), but it can sit in NODE_OPTIONS, in a Dockerfile CMD or in a CI script.

In TypeScript, the compiler already catches part of this. vertex-api's @types/node 24.13.2 doesn't declare fs.F_OK or writeHeader, and 26.6.6 drops SlowBuffer as well. I compiled a file that uses all three on purpose: tsc with @types/node 26 flagged all three, and both projects compiled cleanly with it. What the compiler doesn't read is the JavaScript inside node_modules, and that's where the most interesting case turned up.

The rest of 26.0.0 is additions: the Temporal global on by default, V8 14.6 (with Map.prototype.getOrInsert() and Iterator.concat()), and undici 8 behind fetch. Plus a side effect of Web Storage, on since 25: on 26, without --localstorage-file, reading typeof localStorage returns "undefined" and prints an ExperimentalWarning. A library that checks it to find out whether it's in a browser will put that warning in your logs.

The Package That Dies on require Without a Warning on 24

@nestjs/jwt uses jsonwebtoken, which uses jws, which uses jwa. In version 1.4.1 and in 2.0.0, the first line of jwa loads buffer-equal-constant-time 1.0.1, and that package reads SlowBuffer.prototype at the top of the file, as soon as it's loaded. From 25 on, SlowBuffer is undefined.

This doesn't happen in either of my projects: vertex-api has jwa 2.0.1, and pyxis-api doesn't use jsonwebtoken at all. To see the error, I forced the old version in a separate directory:

{
  "name": "repro-jwa",
  "private": true,
  "dependencies": { "jsonwebtoken": "9.0.2" },
  "overrides": { "jwa": "1.4.1" }
}
$ node --trace-deprecation --pending-deprecation -e "require('jsonwebtoken'); console.log('ok')"   # v24.19.0
ok
$ node -e "require('jsonwebtoken')"   # v26.13.0
...\node_modules\buffer-equal-constant-time\index.js:37
var origSlowBufEqual = SlowBuffer.prototype.equal;
                                  ^

TypeError: Cannot read properties of undefined (reading 'prototype')
    at Object.<anonymous> (...\node_modules\buffer-equal-constant-time\index.js:37:35)
    ...
    at Object.<anonymous> (...\node_modules\jwa\index.js:1:19)

24 stays quiet because the DEP0030 warning fires when something calls SlowBuffer(), and this code only reads a property of it. jwa 1.4.2 and 2.0.1, published on May 7, 2025, only load buffer-equal-constant-time if crypto.timingSafeEqual doesn't exist, which is never the case on a current Node. A lockfile nobody has touched since before then boots on 24 and falls over on the first require on 26, at startup.

The fix fits within the range package.json already accepts (jsonwebtoken 9.0.2 asks for jws ^3.2.2, which asks for jwa ^1.4.1):

npm ls jwa
npm update jwa

In the test directory, npm update jwa moved the package to 1.4.2, and the same require passed on 26.

read() Now Returns One Chunk at a Time

This is the 26.0.0 behavior change that shows up least in the summaries (the commit is "stream: readable read one buffer at a time", nodejs/node#60441). On a byte Readable, without setEncoding, read() with no argument used to return everything in the internal buffer, concatenated. On 26, it returns the next chunk, at the size it was pushed.

// readable-read.mjs: what read() with no argument returns on Node 24 and on Node 26
import { Readable } from 'node:stream';

const r = new Readable({ read() {} });
r.push(Buffer.from('{"id":1,'));
r.push(Buffer.from('"ok":true}'));
r.push(null);

r.once('readable', () => {
  const chunk = r.read(); // no size: "give me whatever is in the buffer"
  console.log(process.version, JSON.stringify(chunk.toString()));
  try {
    console.log('parsed:', JSON.parse(chunk));
  } catch (err) {
    console.log('JSON.parse failed:', err.message);
  }
});
$ node readable-read.mjs   # Node 24.19.0
v24.19.0 "{\"id\":1,\"ok\":true}"
parsed: { id: 1, ok: true }
$ node readable-read.mjs   # Node 26.13.0
v26.13.0 "{\"id\":1,"
JSON.parse failed: Expected double-quoted property name in JSON at position 8 (line 1 column 9)

The effect reaches well beyond a hand-written read(). I read the same three chunks (a, b and c, pushed all at once) six different ways:

How it readsNode 24.19.0Node 26.13.0
read() in a loop until null["abc"]["a","b","c"]
for await (const chunk of stream)["abc"]["a","b","c"]
stream.toArray()["abc"]["a","b","c"]
'data' event["a","b","c"]["a","b","c"]
text() from node:stream/consumers"abc""abc"
read() in a loop, with setEncoding('utf8')["abc"]["abc"]

The new path only applies when the stream has no decoder, which is why setEncoding keeps the old behavior. Code that built a message from a single read(), or that treated each for await iteration as one unit, now gets the message in pieces. On a real socket that code was already wrong, because the network never promised chunk boundaries; 26 just makes the bug deterministic.

The readable.read() docs for 26.13.0 itself still say that, without the argument, the method returns the entire contents of the internal buffer. The script above shows otherwise. The PR description suggests readable.read(readable.readableLength) to get close to the old behavior; when the goal is to read everything, I prefer to drop the manual read() and use text(), json() or buffer() from node:stream/consumers, which gave the same result on both versions.

Across both projects, the only place that reads a stream this way is pyxis-api's CSV export: a for await over the gzip output that joins the chunks with Buffer.concat and doesn't care where each one ends.

fetch Starts Negotiating HTTP/2

undici 8, which sits behind the global fetch in Node 26 (8.12.2 in 26.13.0; 24.19.0 ships 7.29.0), turns HTTP/2 on by default (nodejs/undici#4828). If the server offers h2 during the TLS handshake, fetch uses it. A local server that accepts both protocols shows the difference:

# Self-signed certificate, test only. In Git Bash on Windows, prefix with MSYS_NO_PATHCONV=1.
openssl req -x509 -newkey rsa:2048 -nodes -keyout key.pem -out cert.pem -days 2 -subj "/CN=localhost" -addext "subjectAltName=DNS:localhost"
// fetch-protocol.mjs: which HTTP version the global fetch() uses against a server that accepts both
import { createSecureServer } from 'node:http2';
import { readFileSync } from 'node:fs';

const server = createSecureServer({
  key: readFileSync(new URL('key.pem', import.meta.url)),
  cert: readFileSync(new URL('cert.pem', import.meta.url)),
  allowHTTP1: true, // accepts HTTP/1.1 and HTTP/2; the client picks, through ALPN
});
server.on('request', (req, res) => res.end(`httpVersion=${req.httpVersion}`));
await new Promise((resolve) => server.listen(0, resolve));

process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; // self-signed certificate, local test only
const res = await fetch(`https://localhost:${server.address().port}/`);
console.log(process.version, `undici ${process.versions.undici}`, await res.text());
process.exit(0);
$ node fetch-protocol.mjs   # Node 24.19.0
...
v24.19.0 undici 7.29.0 httpVersion=1.1
$ node fetch-protocol.mjs   # Node 26.13.0
...
v26.13.0 undici 8.12.2 httpVersion=2.0

(The ... cuts the warning Node prints because of NODE_TLS_REJECT_UNAUTHORIZED.)

Both projects use fetch to send email through the Resend API, and api.resend.com offers h2 in the handshake (I checked with openssl s_client -alpn h2,http/1.1). On 26, that traffic switches protocols without a single line of code changing. I didn't send any email in the test: what I measured was fetch, not Resend. The 26.13.0 globals docs, incidentally, still describe undici as an HTTP/1.1 client.

HTTP/2 by default also changes how failures show up. I put together a minimal test: the first fetch to the origin carries a header that undici rejects on both versions (upgrade), followed by two normal requests.

// fetch-h2-hang.mjs: the first fetch to the origin is rejected by undici; what about the next ones?
import { createSecureServer } from 'node:http2';
import { readFileSync } from 'node:fs';

const server = createSecureServer({
  key: readFileSync(new URL('key.pem', import.meta.url)),
  cert: readFileSync(new URL('cert.pem', import.meta.url)),
  allowHTTP1: true,
});
server.on('request', (req, res) => res.end(`httpVersion=${req.httpVersion}`));
await new Promise((resolve) => server.listen(0, resolve));
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
const url = `https://localhost:${server.address().port}/`;

// 'upgrade' is a header undici rejects in fetch, on both versions.
for (const headers of [{ upgrade: 'websocket' }, {}, {}]) {
  const started = performance.now();
  try {
    const res = await fetch(url, { headers, signal: AbortSignal.timeout(3000) });
    console.log(process.version, JSON.stringify(headers), res.status, await res.text());
  } catch (err) {
    const ms = Math.round(performance.now() - started);
    console.log(process.version, JSON.stringify(headers), err.cause?.code ?? err.name, `${ms} ms`);
  }
}
process.exit(0);
$ node fetch-h2-hang.mjs   # Node 24.19.0
v24.19.0 {"upgrade":"websocket"} UND_ERR_INVALID_ARG 15 ms
...
v24.19.0 {} 200 httpVersion=1.1
v24.19.0 {} 200 httpVersion=1.1
$ node fetch-h2-hang.mjs   # Node 26.13.0
v26.13.0 {"upgrade":"websocket"} UND_ERR_INVALID_ARG 17 ms
v26.13.0 {} TimeoutError 3004 ms
v26.13.0 {} TimeoutError 3005 ms

On 26, the following requests to the same origin sit there until AbortSignal.timeout cuts them off, and the NODE_TLS_REJECT_UNAUTHORIZED warning never even appears: no TLS connection was opened. I repeated it several times and the result didn't change. With a successful request first, a single rejection didn't hang anything, but two rejections in a row hung the next request. One plausible way to land here is a route that forwards the headers of the incoming request to a fetch. I don't know whether this is the same defect as two open undici issues about HTTP/2 sessions that never recover (#6073 and #6106, both from October 2026); I'm showing it because it's a kind of failure the same code didn't have on 24.

The documented way back to HTTP/1.1 is to install the undici package and replace the global dispatcher, as the Node globals docs describe. With these lines at the top of the same script, the two requests after the rejection answered again:

+// Requires the undici package at the version Node ships: npm install undici@8.12.2
+import { Agent, setGlobalDispatcher } from 'undici';
 import { createSecureServer } from 'node:http2';
 import { readFileSync } from 'node:fs';

+setGlobalDispatcher(new Agent({ allowH2: false }));
$ node fetch-h2-off.mjs   # Node 26.13.0
v26.13.0 {"upgrade":"websocket"} UND_ERR_INVALID_ARG 100 ms
...
v26.13.0 {} 200 httpVersion=1.1
v26.13.0 {} 200 httpVersion=1.1

I wouldn't turn HTTP/2 off by reflex. But in a service that talks to third-party APIs through fetch, it's the 26 change I'd watch most closely after the deploy, and the first thing I'd test if a new timeout shows up.

A Scan for What 24 Doesn't Warn About

For the items in the table that Node 24 doesn't flag, I wrote a script that looks for the patterns in the project and in node_modules and reports which package and version each hit lives in. It has no dependencies and runs on any Node from 18 up:

#!/usr/bin/env node
// node26-scan.mjs: searches the project (code and node_modules) for what Node 25 and 26 removed.
// Usage: node node26-scan.mjs [project-folder]   (no dependencies; runs on Node 18 or newer)
import { readdirSync, readFileSync, statSync } from 'node:fs';
import { join, relative, sep, basename } from 'node:path';

const root = process.argv[2] ?? process.cwd();

// Each rule: the pattern, the DEP code from the Node docs, and what happens on 26.
const RULES = [
  { id: 'DEP0193', what: "require/import of 'node:_stream_*' (removed in 26)",
    re: /(?:require\s*\(\s*|from\s+|import\s*\(\s*)['"](?:node:)?_stream_(?:readable|writable|duplex|transform|passthrough|wrap)['"]/ },
  { id: 'DEP0063', what: 'response.writeHeader() (removed in 26, use writeHead)',
    re: /\.writeHeader\s*\(/ },
  { id: 'flag', what: '--experimental-transform-types (flag removed in 26)',
    re: /--experimental-transform-types/ },
  // Only access to Node's SlowBuffer; browser polyfills that define their own are left out.
  { id: 'DEP0030', what: 'SlowBuffer (removed in 25)',
    re: /(?:require\(\s*['"](?:node:)?buffer['"]\s*\)|\bbuffer)\.SlowBuffer\b(?!\s*=[^=])|\bSlowBuffer\.prototype\b|new\s+SlowBuffer\s*\(|\{[^}]*\bSlowBuffer\b[^}]*\}\s*(?:=\s*require\(|from)\s*['"](?:node:)?buffer['"]/ },
  { id: 'DEP0176', what: 'fs.F_OK/R_OK/W_OK/X_OK (removed in 25, use fs.constants)',
    re: /\bfs\.(?:F_OK|R_OK|W_OK|X_OK)\b/ },
  { id: 'DEP0147', what: 'fs.rmdir with { recursive } (removed in 25, use fs.rm)',
    re: /\brmdir(?:Sync)?\s*\([^)]*recursive/ },
  { id: 'DEP0173', what: 'assert.CallTracker (removed in 25)',
    re: /\bCallTracker\b/ },
  { id: 'DEP0160', what: "process.on('multipleResolves') (removed in 25)",
    re: /['"]multipleResolves['"]/ },
  { id: 'DEP0205', what: 'module.register() (runtime warning in 26, use registerHooks)',
    re: /\bmodule\.register\s*\(\s*[^)\s]|\{\s*register\s*\}\s*(?:=\s*require\(|from\s+)\s*['"](?:node:)?module['"]/ },
  { id: 'corepack', what: 'corepack (no longer bundled with Node since 25)',
    re: /\bcorepack\s+(?:enable|prepare|use|install)\b/ },
];

const CODE = /\.(?:[cm]?js|[cm]?ts|jsx|tsx)$/;
const DECLARATION = /\.d\.[cm]?ts$/;
const CONFIG = /^(?:package\.json|Dockerfile.*|.*\.ya?ml|.*\.sh|\.npmrc)$/;
const SKIP_DIRS = new Set(['.git', 'coverage', '.cache', '.turbo', '.next']);
// Tests of installed packages don't run in your app; your project's own tests do.
const PACKAGE_TESTS = /node_modules.*[\\/](?:tests?|__tests__)[\\/]|node_modules.*[\\/](?:tests?|[^\\/]+\.(?:test|spec))\.[cm]?js$/;

// For each file in node_modules, returns "package@version"; outside it, "(project)".
const versions = new Map();
function packageOf(file) {
  const parts = relative(root, file).split(sep);
  const i = parts.lastIndexOf('node_modules');
  if (i < 0) return '(project)';
  const nameParts = parts[i + 1]?.startsWith('@') ? parts.slice(i + 1, i + 3) : parts.slice(i + 1, i + 2);
  const dir = join(root, ...parts.slice(0, i + 1), ...nameParts);
  if (!versions.has(dir)) {
    let version = '?';
    try { version = JSON.parse(readFileSync(join(dir, 'package.json'), 'utf8')).version; } catch {}
    versions.set(dir, `${nameParts.join('/')}@${version}`);
  }
  return versions.get(dir);
}

const findings = [];
let scanned = 0;
function walk(dir) {
  let entries;
  try { entries = readdirSync(dir, { withFileTypes: true }); } catch { return; }
  for (const entry of entries) {
    const full = join(dir, entry.name);
    if (entry.isSymbolicLink()) continue;
    if (entry.isDirectory()) {
      // @types/node only has declarations: SlowBuffer shows up there without being used.
      if (!SKIP_DIRS.has(entry.name) && !(entry.name === 'node' && basename(dir) === '@types')) walk(full);
      continue;
    }
    const isCode = CODE.test(entry.name) && !DECLARATION.test(entry.name);
    if (!isCode && !CONFIG.test(entry.name)) continue;
    if (PACKAGE_TESTS.test(full)) continue;
    if (statSync(full).size > 5_000_000) continue;
    scanned++;
    readFileSync(full, 'utf8').split('\n').forEach((line, n) => {
      for (const rule of RULES) {
        const m = rule.re.exec(line);
        if (!m) continue;
        const start = Math.max(0, m.index - 40);
        findings.push({ rule, pkg: packageOf(full), where: `${relative(root, full)}:${n + 1}`,
          snippet: line.slice(start, m.index + m[0].length + 40).trim() });
      }
    });
  }
}

walk(root);

console.log(`${scanned} files read in ${root}`);
if (!findings.length) console.log('Nothing found.');
for (const rule of RULES) {
  const hits = findings.filter((f) => f.rule === rule);
  if (!hits.length) continue;
  console.log(`\n[${rule.id}] ${rule.what}: ${hits.length} hit(s)`);
  for (const h of hits) console.log(`  ${h.pkg}  ${h.where}\n    ${h.snippet}`);
}

On vertex-api, this was the entire output:

$ node node26-scan.mjs vertex-api
21143 files read in vertex-api

[flag] --experimental-transform-types (flag removed in 26): 2 hit(s)
  synckit@0.11.13  node_modules\synckit\lib\constants.js:23
    export const TRANSFORM_TYPES_FLAG = '--experimental-transform-types';
  synckit@0.11.13  node_modules\synckit\lib\index.cjs:72
    const TRANSFORM_TYPES_FLAG = "--experimental-transform-types";

[DEP0030] SlowBuffer (removed in 25): 6 hit(s)
  buffer-equal-constant-time@1.0.1  node_modules\buffer-equal-constant-time\index.js:4
    var SlowBuffer = require('buffer').SlowBuffer;
  buffer-equal-constant-time@1.0.1  node_modules\buffer-equal-constant-time\index.js:31
    Buffer.prototype.equal = SlowBuffer.prototype.equal = function equal(that) {
  buffer-equal-constant-time@1.0.1  node_modules\buffer-equal-constant-time\index.js:37
    var origSlowBufEqual = SlowBuffer.prototype.equal;
  buffer-equal-constant-time@1.0.1  node_modules\buffer-equal-constant-time\index.js:40
    SlowBuffer.prototype.equal = origSlowBufEqual;
  safe-buffer@5.2.1  node_modules\safe-buffer\index.js:64
    return buffer.SlowBuffer(size)
  safer-buffer@2.1.2  node_modules\safer-buffer\dangerous.js:54
    return buffer.SlowBuffer(size)

[DEP0147] fs.rmdir with { recursive } (removed in 25, use fs.rm): 3 hit(s)
  drizzle-kit@0.31.11  node_modules\drizzle-kit\bin.cjs:14350
    rue, force: true }) : await j3.promises.rmdir(this.oldCacheDirectory, { recursive: true }));
  tsx@4.23.0  node_modules\tsx\dist\index-D9F1FXzN.cjs:13
    ecursive:!0,force:!0}):await j.promises.rmdir(this.oldCacheDirectory,{recursive:!0}))}catch{}}}var z=process.env.TSX_DI
  tsx@4.23.0  node_modules\tsx\dist\index-XurvG3JN.mjs:13
    ecursive:!0,force:!0}):await j.promises.rmdir(this.oldCacheDirectory,{recursive:!0}))}catch{}}}var q=process.env.TSX_DI

Eleven hits, and none of them breaks vertex-api on 26. Reading each one took a few minutes:

  • synckit only uses the flag below Node 23.6; on 26 the code leaves the switch before reaching it.
  • In drizzle-kit and tsx, the rmdir with recursive is the fallback branch of an fs.rm ? ... : ..., which only runs on a Node without fs.rm.
  • safe-buffer 5.2.1 exports the native buffer when it has allocUnsafeSlow, so the function that calls SlowBuffer is never used. safer-buffer/dangerous.js isn't imported by any package in the tree.
  • buffer-equal-constant-time is the package from the previous section. It breaks if loaded, and this project's jwa 2.0.1 doesn't load it.

On pyxis-api, the scan found the same families, minus buffer-equal-constant-time, plus an import { register } from "node:module" in jiti 2.6.1, which comes in through ESLint and commitlint. It lives in the file that only runs with --import jiti/register, and nothing in the project uses that.

A scan alone can't tell what gets loaded from what is merely installed. For that, the second script imports each production dependency from package.json on whichever Node runs it:

// load-deps.mjs: imports each production dependency from package.json on the current Node.
// Save it at the project root and run it with the new Node: node load-deps.mjs
// Catches what breaks when the module loads, not what only breaks when a function is called.
import { readFileSync } from 'node:fs';

const pkg = JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf8'));

let failed = 0;
for (const name of Object.keys(pkg.dependencies ?? {})) {
  try {
    await import(name);
    console.log(`ok    ${name}`);
  } catch (err) {
    failed++;
    console.log(`FAIL  ${name}: ${err.code ?? err.name}: ${err.message.split('\n')[0]}`);
  }
}
console.log(`${process.version}: ${failed} failed`);
process.exitCode = failed ? 1 : 0;

In the directory with the old jwa, it catches the problem on 26 and not on 24:

$ node load-deps.mjs   # Node 24.19.0
ok    jsonwebtoken
v24.19.0: 0 failed
$ node load-deps.mjs   # Node 26.13.0
FAIL  jsonwebtoken: TypeError: Cannot read properties of undefined (reading 'prototype')
v26.13.0: 1 failed

In vertex-api and pyxis-api, on 26, every production dependency loaded (0 failed).

What the Two Projects Reported

I ran everything on both Nodes, with the integration and end-to-end databases on a throwaway Postgres in Docker. The Jest suites ran with NODE_OPTIONS="--trace-deprecation --pending-deprecation":

vertex-api (NestJS 11, Fastify)pyxis-api (NestJS 12, Fastify)
Unit248 of 248, on both2,600 of 2,600, on both
Integration with Postgres(none)373 of 373, on both
End-to-end with Postgres65 of 65, on both228 of 228, on both
Lint and buildok on bothok on both, plus typecheck and 33 node --test tests
App booting with both deprecation flags0 warnings0 warnings
load-deps.mjs on 260 failures0 failures

The only native addon in either project, vertex-api's argon2 0.44.0, loaded and produced a hash on 26 without a rebuild. NODE_MODULE_VERSION went from 137 to 147, but the binaries the package ships are N-API, which doesn't depend on it. An addon compiled against Node's ABI, without N-API, would need npm rebuild or a new release.

The engines fields don't hold anyone back either: @nestjs/core 11 and 12 ask for >= 20, postgres asks for >=12, Jest 30 accepts >=24.0.0, and drizzle-orm and fastify declare nothing.

Time and Memory

I measured with no other tests running on the machine (CPU between 6% and 20% before starting), alternating 24 and 26 on every run. The suites ran 5 times each, after a discarded warm-up round. Boot is the time between spawning the process and the first 200 on /health, over 7 runs per Node. Memory was read inside the process (process.memoryUsage()) one second after it was ready and again after 500 requests to /health. The numbers are medians, with min and max in parentheses:

Node 24.19.0Node 26.13.0Difference
vertex-api, unit3.60 s (3.57–4.76)3.27 s (3.19–3.52)−9%
vertex-api, end-to-end4.63 s (4.58–4.99)4.03 s (3.97–4.15)−13%
pyxis-api, unit19.8 s (19.7–21.9)18.3 s (18.1–18.6)−7%
vertex-api, until /health answers703 ms (694–764)575 ms (569–594)−18%
pyxis-api, until /health answers1,112 ms (1,097–1,247)925 ms (917–1,072)−17%
vertex-api, idle RSS137 MiB (137–139)132 MiB (117–133)−4%
pyxis-api, idle RSS241 MiB (214–242)182 MiB (180–184)−24%
vertex-api, heap used after 500 requests55.5 MiB (55.3–57.8)62.5 MiB (58.4–62.6)+13%
pyxis-api, heap used after 500 requests81.9 MiB (70.0–98.3)76.4 MiB (55.4–82.2)−7%

26 was faster in every time median, and the min–max ranges of the two versions don't overlap on any time row. On memory, RSS dropped in both projects, but heap after the requests went up in one and down in the other. With that much spread, I wouldn't draw any conclusion about heap. This is a Windows laptop (i9-13900H) and a long-lived process, not a Lambda cold start, which has a different size of CPU and disk. The boot gain is the number I most wanted to measure on the managed runtime, and I haven't been able to yet.

On Lambda, 26 Is Still a Preview

Both APIs run on Lambda as container images, and both images start from public.ecr.aws/lambda/nodejs:24. This is where Node's LTS date and the production date part ways.

AWS announced nodejs26.x as a public preview in August 2026 (announcement and Compute blog post), both as a managed runtime and as a base image tagged 26-preview. The runtimes page states plainly that the preview has no SLA or support and must not be used in production, and lists November 2026 as the target launch month, with the caveat that the date is indicative. The AWS post ties the launch to Node 26 reaching Active LTS, which happened on October 28, and aims for up to two months after that.

There's a Lambda detail a generic upgrade guide doesn't cover. The Lambda runtime turns off experimental Node features with its own flags: on 20, 22 and 24 it passes --no-experimental-require-module, and anyone who wants require() of ES modules has to turn it back on with NODE_OPTIONS=--experimental-require-module. pyxis-api's Dockerfile.lambda does exactly that. The docs table doesn't list 26 yet, and on the preview's feedback issue (aws-lambda-nodejs-runtime-interface-client#198) users report that require(esm) is still off and that Temporal doesn't show up in nodejs26.x.

I checked on the 26-preview image published on October 30 (26-preview.2026.10.30.17-x86_64), with a function that only returns what it sees, invoked through the emulator that ships inside the image:

// index.js: what the nodejs26.x (preview) runtime shows a function
exports.handler = async () => {
  let requireEsm;
  try {
    requireEsm = require('./esm-dep.mjs').kind;
  } catch (err) {
    requireEsm = `${err.code}: ${err.message.split('\n')[0]}`;
  }
  return {
    version: process.version,
    temporal: typeof Temporal,
    requireModuleFeature: process.features.require_module,
    execArgv: process.execArgv,
    nodeOptions: process.env.NODE_OPTIONS ?? null,
    requireEsm,
  };
};
== NODE_OPTIONS=''
{"version":"v26.13.0","temporal":"undefined","requireModuleFeature":false,
 "execArgv":["--expose-gc","--max-http-header-size","81920","--no-experimental-detect-module",
 "--no-experimental-require-module","--no-experimental-ffi","--max-semi-space-size=50","--max-old-space-size=2708"],
 "nodeOptions":null,
 "requireEsm":"ERR_REQUIRE_ESM: require() of ES Module /var/task/esm-dep.mjs from /var/task/index.js not supported."}
== NODE_OPTIONS=--experimental-require-module
{"version":"v26.13.0","temporal":"undefined","requireModuleFeature":true, ... "requireEsm":"esm"}

esm-dep.mjs is a single line, export const kind = 'esm';, and the output was wrapped here to fit. Both reports hold, for different reasons. require(esm) is off because of the flag the runtime passes, and the same NODE_OPTIONS as before turns it back on. Temporal doesn't come back with any flag: running the image's node directly, outside the runtime, typeof Temporal is also "undefined", and that binary's process.config has v8_enable_temporal_support: 0, while the official 26.13.0 zip has 1. Lambda's Node was built without Temporal. That holds for the preview image from that date; the runtime may change before launch. If you're thinking about replacing date-fns or Luxon with Temporal as part of the upgrade, on Lambda that swap still has to wait.

The Upgrade Checklist for Your Project

This is what I ran, in order. The commands are for bash (Git Bash on Windows).

  1. On your usual Node 24, see what it already flags:

    NODE_OPTIONS="--trace-deprecation --pending-deprecation" npm test
    npm run build && node --trace-deprecation --pending-deprecation dist/main.js
    
  2. Look for what it doesn't flag, and check jwa:

    node node26-scan.mjs .
    npm ls jwa
    
  3. Put a Node 26 next to the installed one, without replacing the system Node. I used the official zip and checked its SHA-256:

    curl -O https://nodejs.org/dist/v26.13.0/SHASUMS256.txt
    curl -O https://nodejs.org/dist/v26.13.0/node-v26.13.0-win-x64.zip
    grep " node-v26.13.0-win-x64.zip$" SHASUMS256.txt | sha256sum -c -
    unzip -q node-v26.13.0-win-x64.zip
    export PATH="$PWD/node-v26.13.0-win-x64:$PATH"
    node -v   # v26.13.0
    

    On Linux, the file is node-v26.13.0-linux-x64.tar.xz and the binary lives in bin/; I didn't run that variant.

  4. With 26 on your PATH, at the project root:

    node load-deps.mjs
    npm test
    npm run build && node --trace-deprecation --pending-deprecation dist/main.js
    
  5. Search your code for read() with no argument on byte streams, for await and toArray() loops that treat each chunk as a unit, and headers forwarded to fetch. No script finds those for you.

  6. Change the version everywhere it lives. In vertex-api that's 5 node-version: 24 lines across 4 workflows, 4 FROM node:24-alpine in the Dockerfile and 4 FROM public.ecr.aws/lambda/nodejs:24 in Dockerfile.lambda, plus @types/node. In pyxis-api it's .nvmrc (read by 9 workflow steps), engines, the digest-pinned images in both Dockerfiles and in the workflow that mirrors them, and @types/node.

  7. Decide where you deploy before swapping the image: on Lambda, nodejs:26-preview is for testing, not for production.

The Calendar That Sets the Pace

Node 24 entered maintenance on October 20, 2026 and reaches end of life on April 30, 2028, according to the project's schedule.json. 26 became LTS ("Lithium") on October 28, 2026 and runs until the end of April 2029. There's no calendar reason to leave 24 this month; the deadline that matters is April 2028.

26 is also the last release under the old model. From 27 on, as the project announced in March, there's one major release a year, in April, which becomes LTS in October. Every release becomes LTS, and the role of the odd-numbered releases moves to an alpha channel that starts in October 2026. For LTS-only users, according to the announcement itself, little changes beyond the numbering.

Both Dockerfile.lambda files stay on nodejs:24 until nodejs26.x leaves preview. What's still left to measure is what this local test can't reach: cold start and memory on the managed runtime, and how fetch's HTTP/2 sessions behave in a process that Lambda freezes between one invocation and the next.

Comments

Loading comments...