vercel/next.js · error · Error
Invalid fallback option
Error message
Invalid fallback option: ${fallbackField}. Fallback option must be a string, null, undefined, or false. What it means
Schema validation in parseFallbackField: the fallback field read from the prerender manifest did not match any of the accepted shapes (string, null, false, undefined). It is a malformed-manifest signal — the value's runtime type is none of the forms the build pipeline ever writes.
Solutions
- Set fallback in getStaticPaths to a string locale, null, undefined, or false.
Defensive patterns
Strategy: validation
When it happens
Trigger: A fallback option in routing/i18n config has an invalid type.
Common situations: Passing a non-string, non-boolean value as a fallback field in configuration.
AI-assisted analysis of vercel/next.js@0eb3775416 (2026-08-19).
Data as JSON: /api/errors/846f31a0e2b313b6.
Report an issue: GitHub.
Appendix: source
Thrown at packages/next/src/lib/fallback.ts:49
/**
* Parses the fallback field from the prerender manifest.
*
* @param fallbackField The fallback field from the prerender manifest.
* @returns The fallback mode.
*/
export function parseFallbackField(
fallbackField: string | boolean | null | undefined
): FallbackMode | undefined {
if (typeof fallbackField === 'string') {
return FallbackMode.PRERENDER
} else if (fallbackField === null) {
return FallbackMode.BLOCKING_STATIC_RENDER
} else if (fallbackField === false) {
return FallbackMode.NOT_FOUND
} else if (fallbackField === undefined) {
return undefined
} else {
throw new Error(
`Invalid fallback option: ${fallbackField}. Fallback option must be a string, null, undefined, or false.`
)
}
}
export function fallbackModeToFallbackField(
fallback: FallbackMode,
page: string | undefined
): string | false | null {
switch (fallback) {
case FallbackMode.BLOCKING_STATIC_RENDER:
return null
case FallbackMode.NOT_FOUND:
return false
case FallbackMode.PRERENDER:
if (!page) {
throw new Error(
`Invariant: expected a page to be provided when fallback mode is "${fallback}"`View on GitHub (pinned to 0eb3775416)