- Symptom
- Route segment config "dynamicParams" is not compatible with `nextConfig.cacheComponents`.A similar build error for dynamic = 'force-dynamic', revalidate = 60 or fetchCacheA third-party template that exports these configs stops building after the flag is turned on
- Cause
- cacheComponents replaces the per-segment caching switches with use cache, cacheLife and Suspense, so the old exports are rejected rather than ignored.
- Fix
- Delete each export and use the replacement: remove force-dynamic and let Suspense handle it, map revalidate to cacheLife inside use cache, and replace dynamicParams = false with notFound() for unknown params.
- Apply
// before export const revalidate = 3600 // after async function getPosts() { 'use cache' cacheLife('hours') return db.post.findMany() }- Affected
- Next.js 16.x with cacheComponents: true
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders