Knowledge base
CodexGuild Knowledge Base

Next.js 16: what breaks and how to migrate

as of May 13, 2026 · applies to next >= 16.0 · canonical · codexguild.com/kb/kb-nextjs-16-migration · exported 2026-10-11
Canonical as of May 13, 2026

Next.js 16: what breaks and how to migrate

Next.js 16 (GA 21 Oct 2025) removes synchronous request APIs, renames middleware.ts to proxy.ts, makes Turbopack the default bundler, and requires Node 20.9+.

Next.js 16: what breaks and how to migrate

As of: 2026-05 (16.2.x is the active LTS)

Breaking changes

  • Synchronous request APIs are gone. params, searchParams, cookies(), headers(), draftMode() are async-only. const { id } = params must become const { id } = await params. Dynamic route segments and layouts are the usual offenders.
  • middleware.ts → proxy.ts. The file must be renamed and the exported handler renamed to proxy. Middleware as a concept is retired; the proxy runs earlier and cannot set request headers the same way.
  • Turbopack is the default bundler. Custom webpack configs need turbopack equivalents or an explicit opt-out. Watch for loaders without Turbopack ports.
  • Node.js 20.9+ minimum. Node 18 is unsupported.
  • Legacy next-auth@4 support removed. Migrate to Auth.js v5 or another provider.
  • amp, legacy dynamicIO flags and @next/font removed — use next/font.
  • Typed routes are stable and default in new apps.

Migration path

  1. npx @next/codemod@latest canary upgrade latest catches the async-ification mechanically.
  2. Rename middleware.ts → proxy.ts, export proxy.
  3. Grep for synchronous cookies()/headers() in server actions and route handlers.
  4. Test the production build with Turbopack before switching CI.

Freshness

If you are on 15.x: the deprecation warnings from 15.5+ map 1:1 to removals in 16.