Skip to content
All news
ReleaseAI-written

NestJS 11.2.12 updates Fastify platform and requires Node.js 20.19+

NestJS 11.2.12 updates @nestjs/platform-fastify to use @fastify/middie 9.3.8, causing malformed URLs to return a 400 error, backports middleware support from @fastify/middie 9.3.9, and raises the minimum Node.js requirement to 20.19 (or 22.12) to avoid ERR_REQUIRE_ESM.

NestJS 11.2.12 was released on 2026-11-25. The release updates the Fastify platform dependencies and increases the required Node.js version. Two key changes are the adoption of @fastify/middie 9.3.8 and the backport of middleware support from @fastify/middie 9.3.9.

The @nestjs/platform-fastify package now depends on @fastify/middie version 9.3.8. With this version, requests that contain malformed URLs trigger a 400 error (FST_ERR_MIDDIE_MALFORMED_URL) instead of reaching the not‑found handler. This behavior changes how invalid URLs are processed by the Fastify adapter.

In addition, the package upgrades @fastify/middie to version 9.3.9. The upgrade backports changes that add middleware to Fastify plugins registered before middie. The new middleware execution mirrors Nest’s own middleware flow, ensuring that middleware runs only once per request.

Because @fastify/middie 9.3.7 and later load the ES module path‑to‑regexp via require(), @nestjs/platform-fastify 11.2.12 now requires Node.js 20.19 or later, or Node.js 22.12 or later. Importing the platform‑fastify package on earlier Node.js versions fails with the ERR_REQUIRE_ESM error. This requirement is listed as a breaking change: Node.js versions below 20.19 or 22.12 produce the ERR_REQUIRE_ESM error.

The full list of changes between v11.2.11 and v11.2.12 is available at the GitHub compare URL.