With cacheComponents enabled, request-time asynchronous data must have a parent Suspense boundary so Next.js can render a fallback. Data intended for reuse instead needs an explicit caching design.
Uncached data was accessed outside of <Suspense>rendering
Observed message
Uncached data was accessed outside of <Suspense>
Why it happens
A component awaits uncached database or fetch work outside Suspense.
Request parameters, cookies, headers, or connection are accessed before the boundary.
How to fix it
Identify the component from the error overlay. For build-only failures, next build --debug-prerender can provide more useful stack traces.
Move request-dependent work into a child component and put Suspense around that child with a meaningful loading fallback. A boundary returned after the await is too late.
For data genuinely safe to reuse, consider a use cache function with appropriate cache lifetime and invalidation. Do not put private request cookies or user-specific data into a shared cache merely to suppress the error.
Rebuild with cacheComponents enabled and verify both fallback behavior and fresh request-dependent content.