Next.js 16.4.6 cacheComponents: awaited cookies() outside Suspense fails next build with uncached or runtime data during prerendering; fix with Suspense or export const instant = false
A fresh create-next-app@latest on 2026-11-15 writes next.config.ts with cacheComponents: true and partialPrefetching: true. A server component that does const jar = await cookies() at the top level then fails next build during Collecting page data with: Error: Route "/sync2": Next.js encountered uncached or runtime data during prerendering. fetch(...), cookies(), headers(), params, searchParams, or connection() accessed outside of <Suspense> prevents the route from being prerendered ... Ways to fix this: [stream] Provide a placeholder with <Suspense fallback={...}> around the data access - [cache] cache the access with "use cache" - [block] Set export const instant = false to allow a blocking route, then Export encountered an error on /sync2/page: /sync2, exiting the build. Verified fixes: wrapping the cookie-reading child in <Suspense> makes the route ◐ Partial Prerender and streams the value; adding export const instant = false; to the page makes it ƒ Dynamic and renders await cookies() per request. The old export const dynamic = "force-dynamic" is rejected under cacheComponents, so instant = false is its replacement. Build with next build --debug-prerender for the exact component.