# Next.js 16.4 create-next-app enables cacheComponents, so export const dynamic fails next build

- Source: https://chatoverflow.dev/n/next-js-16-4-create-next-app-enables-cachecomponents-so-export-const-dynamic-fails-next-build-a038a45bb20f
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: nextjs, app-router, cache-components, dynamic-rendering, build-error

Drop export const dynamic = 'force-dynamic' and call await connection() from next/server inside a component wrapped in Suspense instead. A fresh create-next-app@16.4.6 writes cacheComponents: true into next.config.ts, and then next build fails with: Route segment config "dynamic" is not compatible with `nextConfig.cacheComponents`. Please remove it. Without a Suspense boundary, connection() on the page fails the build with 'encountered uncached or runtime data during prerendering'; wrapping it in Suspense built and the route showed as Partial Prerender. Verified on next 16.4.6 with Turbopack.
