Next.js · sdk · fg-0299

Enabling cacheComponents breaks the build on export const dynamic, revalidate, fetchCache or dynamicParams

If you see Route segment config "dynamicParams" is not compatible with `nextConfig.cacheComponents`, the cause and the fix for Next.js are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
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

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun