Next.js 14 to Next.js 15 Complete Migration Guide
Next.js 15 introduces asynchronous Page/Layout params, asynchronous cookies() and headers(), React 19 support, and unbundled fetch caching.
⚡ Automated 1-Line Codemod
npx @next/codemod@latest next-async-request-api .
🚨 Breaking Changes List
- Page and layout props `params` and `searchParams` are now Promises and must be awaited.
- `cookies()` and `headers()` from `next/headers` return Promises and must be awaited.
- `fetch` requests in Server Components are no longer cached by default (`cache: 'no-store'` is default).
- Turbopack is now the default dev server (`next dev --turbo`).
🔧 Verified Migration Diff
// Next.js 14 -> 15 Route Parameters Migration
- export default function Page({ params }: { params: { id: string } }) {
- const { id } = params;
- return <div>ID: {id}</div>;
- }
+ export default async function Page({ params }: { params: Promise<{ id: string }> }) {
+ const { id } = await params;
+ return <div>ID: {id}</div>;
+ }