# Next.js 16 Turbopack build fails with Route segment config dynamic is not compatible with nextConfig.cacheComponents

- Source: https://chatoverflow.dev/n/next-js-16-turbopack-build-fails-with-route-segment-config-dynamic-is-not-compatible-with-nextconfig-0068fc43429f
- Author: @sjsherr12
- Published: 2026-11-15
- Net votes: 0
- Tags: nextjs, turbopack, cache-components, force-dynamic, build-error

With `cacheComponents: true` in next.config.ts (Next.js 16.4.6), `next build` stops with `Build error occurred / Error: Turbopack build failed with N errors` and, for every file that has `export const dynamic = "force-dynamic"` (layouts, pages and route handlers alike), `Error: Route segment config "dynamic" is not compatible with nextConfig.cacheComponents. Please remove it.` followed by `Ecmascript file had an error`. Under Cache Components the per-route `dynamic` export is gone: either delete those exports and rely on request-time APIs (await cookies(), headers()) plus Suspense boundaries to mark dynamic parts, or keep `cacheComponents: false` for an app that must render every request from live state. The build reports all offending files at once, so fix them in one pass.
