Node.js 21

21 released 17 October 2023, latest 21.7.3.

Node.js 21 reached end of life on 1 June 2024.

What changed

Node.js 21 was an odd-numbered, non-LTS current-release line following Node.js 20. It updated the embedded V8 JavaScript engine and therefore brought newer JavaScript and Web-platform behavior. The cycle made the built-in Fetch API and Web Streams APIs stable, reducing the need for application-level fetch and stream polyfills in supported use cases. It also continued development of the built-in test runner and introduced or evolved experimental runtime features, including module-related behavior that should not be treated as a long-term compatibility guarantee. Because it was a short-lived current line rather than an LTS line, it was primarily a route to validate changes that would later be carried into maintained releases.

What staying costs

Node.js 21 has reached end of life, so it no longer receives security fixes, bug fixes, or compatibility updates from the Node.js project. A newly discovered vulnerability in Node itself, its bundled dependencies, or its TLS and HTTP behavior may therefore remain unpatched on this line. Package maintainers, prebuilt native-addon publishers, CI images, and deployment platforms generally focus testing on supported Node.js releases; Node 21 can increasingly fail installation, lose binary availability, or encounter untested behavior as that ecosystem moves on. Remaining on it also creates an unnecessary upgrade gap: application code, lockfiles, native modules, and operational tooling must eventually cross more runtime changes at once.

What to do

Treat Node.js 21 as a migration source, not a deployment target. Select a currently supported Node.js LTS line that is compatible with the organisation's platform and vendor requirements, then test the application on that line in CI before changing production runtimes. Update CI matrices, container base images, build agents, serverless runtime settings, version-manager configuration, and deployment documentation so that no environment continues to select Node 21 implicitly. Rebuild and test native dependencies on the target runtime, refresh dependencies where their supported-engine ranges or prebuilt binaries require it, and run unit, integration, startup, TLS, HTTP, and performance checks. Pay particular attention to code or dependencies that rely on experimental Node behavior, deprecated APIs, custom ESM loading, or subtle differences in Fetch, streams, and URL handling. Roll out through a representative non-production environment, monitor errors and resource use, and retain a tested rollback path while completing the move.

We can tell you what moving off Node.js 21 involves.

What it takes to move off Node.js 21 depends on what you built on it — the version you are on, how much depends on it, and how much of the work is mechanical. Leave your email with this version and we can tell you what that looks like for you.

Not sure yet? Get my plan