Next.js · sdk · fg-0309
params.id is undefined after upgrading to Next.js 16 because params and searchParams are Promises
params.slug is undefined in a page that worked on Next.js 14
Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100
Cause
Next.js 15 turned params, searchParams, cookies(), headers() and draftMode() into Promises but kept a synchronous fallback with a warning. Next.js 16 removed that fallback, so property reads on the raw prop return undefined.
Fix
Await the prop in Server Components and unwrap it with React.use() in Client Components. Run the async request API codemod, since the general upgrade codemod skips it.
Apply
npx @next/codemod@canary next-async-request-api .
export default async function Page(props: PageProps<'/blog/[slug]'>) {
const { slug } = await props.params
}Affects: Next.js 15 (warning) and 16 (sync access removed); also opengraph-image, icon and sitemap id params in 16
Sources
- https://nextjs.org/docs/app/guides/upgrading/version-16
- https://nextjs.org/docs/messages/sync-dynamic-apis
- https://github.com/vercel/next.js/issues/74406
Have your agent know this before it fails
claude mcp add --transport http footgun https://getfootgun.com/api/mcp