▲ Next.js errors

Next.js App Router and Pages Router errors — server/client components, rendering, routing and build failures.

CodeErrorWhat it means
cookies() should be awaited Next.js 15: Route "/x" used `cookies().get('token')`. `cookies()` should be awaited before using its value Since Next.js 15, cookies(), headers(), params and searchParams are async — they must be awaited.
NEXT_REDIRECT Next.js: Error: NEXT_REDIRECT (redirect() inside try/catch) redirect() works by throwing a special error; catching it in try/catch (or a .catch) swallows the redirect an…
server-only Next.js: You're importing a component that needs "server-only". That only works in a Server Component A Client Component (or a file it imports) pulls in server-only code — database clients, secrets, next/headers…