Next.js · sdk · fg-0299
Enabling cacheComponents breaks the build on export const dynamic, revalidate, fetchCache or dynamicParams
Route segment config "dynamicParams" is not compatible with `nextConfig.cacheComponents`.
Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100
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()
}Affects: Next.js 16.x with cacheComponents: true
Sources
Have your agent know this before it fails
claude mcp add --transport http footgun https://getfootgun.com/api/mcp