vercel/next.js · error · DynamicServerError
revalidate: 0 configured ${segment}
Error message
revalidate: 0 configured ${segment} What it means
Not an error by itself: createComponentTreeInternal assigns this string to workStore.dynamicUsageDescription when, during prerendering (and not under forceStatic), a segment declares revalidate: 0 (i.e. always-dynamic caching). Recording the description here is what later produces the static-generation bailout error explaining which segment opted the route out of static rendering.
Source
Thrown at packages/next/src/server/app-render/create-component-tree.tsx:381
// A request store doesn't have a revalidate property.
break
// createComponentTree is not called for these stores:
case 'cache':
case 'private-cache':
case 'prerender-client':
case 'validation-client':
case 'unstable-cache':
case 'generate-static-params':
break
default:
workUnitStore satisfies never
}
if (!workStore.forceStatic && isPrerendering && defaultRevalidate === 0) {
const dynamicUsageDescription = `revalidate: 0 configured ${segment}`
workStore.dynamicUsageDescription = dynamicUsageDescription
throw new DynamicServerError(dynamicUsageDescription)
}
}
// Read unstable_dynamicStaleTime from page modules (not layouts) and track it on
// the store's stale field. This affects the segment cache stale time via
// the StaleTimeIterable.
if (
isPage &&
typeof layoutOrPageMod?.unstable_dynamicStaleTime === 'number'
) {
const pageStaleTime = layoutOrPageMod.unstable_dynamicStaleTime
switch (workUnitStore.type) {
case 'prerender':
case 'prerender-runtime':
case 'prerender-legacy':
if (workUnitStore.stale > pageStaleTime) {
workUnitStore.stale = pageStaleTime
}View on GitHub (pinned to 43273a1d21)
Solutions
- Use `revalidate: false` instead of `revalidate: 0`; 0 is not a valid revalidate value for this segment.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/next/src/server/app-render/create-component-tree.tsx:381 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of vercel/next.js@43273a1d21 (2026-08-19).
Data as JSON: /api/errors/296d0cdc7297e55c.
Report an issue: GitHub.