In Next.js 15, request APIs are promises. Await `cookies()` wherever it is read, and apply the same migration to `headers()`, `params`, and `searchParams`: ```tsx import { cookies } from 'next/headers' export default async function Page() { const cookieStore = await cookies() const session = cookieStore.get('session') return <Dashboard session={session?.value ?? null} /> } ``` Update middleware, layouts, route handlers, and server actions too; run the async request API codemod or search for u...
Installs into .claude/skills of the current project.
Are you the author of Nextjs App Router?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-nextjs-app-router-658a368f)
# Fix async request APIs
In Next.js 15, request APIs are promises. Await `cookies()` wherever it is read, and apply the same migration to `headers()`, `params`, and `searchParams`:
```tsx
import { cookies } from 'next/headers'
export default async function Page() {
const cookieStore = await cookies()
const session = cookieStore.get('session')
return <Dashboard session={session?.value ?? null} />
}
```
Update middleware, layouts, route handlers, and server actions too; run the async request API codemod or search for unawaited calls before verifying with `next build`.