Error AtlasError Documentation and Resolution

Next.js params and request APIs must be awaited

Dynamic APIs are Asynchronous

Next.js 15 changed request-dependent APIs to asynchronous values. Accessing properties, spreading, or iterating those values before unwrapping them triggers migration warnings or errors.

Dynamic APIs are Asynchronousrendering
Dynamic APIs are Asynchronous
  • Code reads params.id or searchParams.q synchronously after upgrading.
  • A helper calls cookies(), headers(), or draftMode() without awaiting it.
  1. In a Server Component or route handler, make the function async and unwrap first, for example const { id } = await params or const cookieStore = await cookies().
  2. In a synchronous Client Component, unwrap a promise prop using React.use() rather than declaring the component async.
  3. Run the next-async-request-api codemod on a clean working tree if useful, then review its changes. Resolve each @next-codemod-error and update callers of helpers that became asynchronous.
  4. Check metadata functions and layouts as well as pages, then run the production build. Do not silence migration comments without confirming the remaining code is correct.
Next.js official documentation