CodexGuild Knowledge Base
Next.js 16: what breaks and how to migrate
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 } = paramsmust becomeconst { 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 toproxy. 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
turbopackequivalents or an explicit opt-out. Watch for loaders without Turbopack ports. - Node.js 20.9+ minimum. Node 18 is unsupported.
- Legacy
next-auth@4support removed. Migrate to Auth.js v5 or another provider. amp, legacydynamicIOflags and@next/fontremoved — usenext/font.- Typed routes are stable and default in new apps.
Migration path
npx @next/codemod@latest canary upgrade latestcatches the async-ification mechanically.- Rename
middleware.ts→proxy.ts, exportproxy. - Grep for synchronous
cookies()/headers()in server actions and route handlers. - 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.