Common Next.js errorsparams should be awaited before using its properties
Error: Route "/products/[slug]" used `params.slug`. `params` should be awaited before using its properties. The same goes for searchParams. Since Next.js 15, both are Promises in pages, layouts, route handlers and generateMetadata.
Why it happens
Code written for Next.js 14 reads params.slug straight away. Next.js 15 still allowed it with this warning. Next.js 16 removed synchronous access completely, so after upgrading the page fails until params is awaited.
How to fix it
app/products/[slug]/page.tsx type Props = {
params: Promise<{ slug: string }>
searchParams: Promise<{ [key: string]: string | string[] | undefined }>
}
export async function generateMetadata({ params }: Props) {
const { slug } = await params
return { title: slug }
}
export default async function Page({ params, searchParams }: Props) {
const { slug } = await params
const { sort } = await searchParams
// ...
}
In a Client Component that receives them as props, read them with React's use() instead of await. Next.js has a codemod that makes most of these changes for you: npx @next/codemod@canary next-async-request-api .