Next.js: params, searchParams, or cookies() must be awaited
The build warns that params, searchParams, cookies(), or headers() was used like a plain object? In Next.js 15 those APIs are async.
Reviewed October 15, 2026
What it means in plain English
Next.js 15 made several request APIs asynchronous. The warning shows up when code reads params.id, spreads searchParams, or calls cookies(), headers(), or draftMode() as if they returned a value immediately. Next.js says those APIs are now promises.
Likely causes
- A page still uses
function Page({ params })and then readsparams.id. - A cookie check runs in a function that is not
async. - The code enumerates the value, such as
{...params}orObject.keys(params), which Next.js also treats as a sync read.
How to fix it, step by step
- On the server, make the function
asyncandawaitthe API before reading a property. Next.js's example isconst { id } = await params. - In a Client Component, unwrap the promise with
React.use(). Next.js showsconst { id } = React.use(params)inside a file that starts with'use client'. - Many call sites can be updated with the codemod Next.js documents:
npx @next/codemod@canary next-async-request-api .Next.js says the codemod cannot cover every case, and a leftover@next-codemod-errorcomment has to be fixed by hand or the build will fail. - You can wait to unwrap the promise until the value is actually needed. Next.js says that lets more of the page stay static.
How to check it worked
next buildno longer warns about a sync dynamic API.- A dynamic route still receives its id, and a cookie check still sees the session cookie.
Sources
Related fixes
More Next.js errors fixes
Keep going on your own.
The guides stay free. A deep leak report is $15. Fix packs are $24, or $49 for all three. There is no done-for-you repair.