Await cookies, headers and draftMode
ProprietaryNext.js 15 made cookies(), headers() and draftMode() from next/headers asynchronous. Awaits each call in an async function, making a synchronous App Router page, layout or route handler async first. Elsewhere in synchronous TypeScript code, casts the call to its UnsafeUnwrapped type, the upgrade guide's temporary synchronous usage. Meant for projects on Next.js 15; run it through UpgradeToNextjs15 when upgrading.
io. moderne. nextjs.15. async-request-apismod run . --recipe= io. moderne. nextjs.15. async-request-apisInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.