vercel/swr · error
Missing pre-initiated data for serialized key "${key}" durin
Error message
Missing pre-initiated data for serialized key "${key}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning. What it means
Error "Missing pre-initiated data for serialized key "${key}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning." thrown in vercel/swr.
Source
Thrown at src/index/use-swr.ts:434
},
() => {
hydrationRef.current = true
return hydrationRef
}
)
const isHydration = hydrationRef.current
// During the initial SSR render, warn if the key has no data pre-fetched via:
// - fallback data
// - preload calls
// - initial data from the cache provider
// We only warn once for each key during Hydration.
if (
strictServerPrefetchWarning &&
isHydration &&
!suspense &&
hasKeyButNoData
) {
console.warn(
`Missing pre-initiated data for serialized key "${key}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`
)
}
// Resolve the default validating state:
// If it's able to validate, and it should revalidate when mount, this will be true.
// - Suspense mode and there's stale data for the initial render.
// - Not suspense mode and there is no fallback data and `revalidateIfStale` is enabled.
// - `revalidateIfStale` is enabled but `data` is not defined.
const shouldDoInitialRevalidation = (() => {
if (!key || !fetcher) return false
// If it's paused, we skip revalidation.
if (getConfig().isPaused()) return false
// if a key already has revalidators and also has error, we should not trigger revalidation
if (hasRevalidator && !isUndefined(error)) return false
// If `revalidateOnMount` is set, we take the value directly.
if (isInitialMount && !isUndefined(revalidateOnMount))
return revalidateOnMountView on GitHub (pinned to 7173e55b2a)
When it happens
Trigger: Thrown at src/index/use-swr.ts:434 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of vercel/swr@7173e55b2a (2026-08-27).
Data as JSON: /api/errors/ce1adf93128a2212.
Report an issue: GitHub.