loke.dev
An abstract route map with one asynchronous path highlighted

Fix “params should be awaited” in Next.js App Router

Fix the Next.js “params should be awaited” error in App Router pages and layouts, with safe TypeScript patterns and a migration checklist.

Published By Loke1 min read

In Next.js 15 and later, dynamic route params are asynchronous. The direct code change is small, but pages, layouts, and metadata generators all need the correct Promise shape.

Resolve params at the server boundary

Make the page or layout async, await params once, then pass plain values to the rest of the application.

Beforeparams.slugSync access fails in Next.js 15+
Afterconst { slug } = await paramsResolve once at the server boundary
In Next.js App Router code, resolve route params at the server boundary before reading a property from them.
type PageProps = { params: Promise<{ slug: string }> }

export default async function Page({ params }: PageProps) {
  const { slug } = await params
  const post = await getPost(slug)
  return <Article post={post} />
}

Update generateMetadata too

Metadata often gets missed because it is not visible in the page UI. Await params before loading a title, description, canonical URL, or Open Graph data.

type Props = { params: Promise<{ slug: string }> }

export async function generateMetadata({ params }: Props) {
  const { slug } = await params
  return { title: (await getPost(slug)).title }
}

Keep Client Components synchronous

Prefer resolving the Promise in a Server Component and passing plain data down. Use React’s use API only where a Promise genuinely must cross a client boundary.

Verify the whole route

rg "\b(params|searchParams)\b" app src
npm run lint
npm run build

Test a real dynamic route in a production build, including its metadata and 404 behavior. This catches the remaining synchronous access paths.

If the upgrade also left a page visually broken, use the Next.js CSS troubleshooting guide to isolate imports, modules, Tailwind output, and production assets.

Sources and further reading

  1. Dynamic APIs are Asynchronous · Vercel
  2. Upgrading: Version 15 · Vercel
  3. Dynamic Routes · Vercel