{"record":{"id":"846f31a0e2b313b6","repo":"vercel/next.js","slug":"invalid-fallback-option-fallbackfield-fallbac","errorCode":null,"errorMessage":"Invalid fallback option: ${fallbackField}. Fallback option must be a string, null, undefined, or false.","messagePattern":"Invalid fallback option: (.+?)\\. Fallback option must be a string, null, undefined, or false\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/next/src/lib/fallback.ts","lineNumber":49,"sourceCode":"/**\n * Parses the fallback field from the prerender manifest.\n *\n * @param fallbackField The fallback field from the prerender manifest.\n * @returns The fallback mode.\n */\nexport function parseFallbackField(\n  fallbackField: string | boolean | null | undefined\n): FallbackMode | undefined {\n  if (typeof fallbackField === 'string') {\n    return FallbackMode.PRERENDER\n  } else if (fallbackField === null) {\n    return FallbackMode.BLOCKING_STATIC_RENDER\n  } else if (fallbackField === false) {\n    return FallbackMode.NOT_FOUND\n  } else if (fallbackField === undefined) {\n    return undefined\n  } else {\n    throw new Error(\n      `Invalid fallback option: ${fallbackField}. Fallback option must be a string, null, undefined, or false.`\n    )\n  }\n}\n\nexport function fallbackModeToFallbackField(\n  fallback: FallbackMode,\n  page: string | undefined\n): string | false | null {\n  switch (fallback) {\n    case FallbackMode.BLOCKING_STATIC_RENDER:\n      return null\n    case FallbackMode.NOT_FOUND:\n      return false\n    case FallbackMode.PRERENDER:\n      if (!page) {\n        throw new Error(\n          `Invariant: expected a page to be provided when fallback mode is \"${fallback}\"`","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/vercel/next.js/blob/0eb377541648e63402a47b38fee00a8d0ce8f8f1/packages/next/src/lib/fallback.ts#L31-L67","documentation":"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.","triggerScenarios":"A fallback option in routing/i18n config has an invalid type.","commonSituations":"Passing a non-string, non-boolean value as a fallback field in configuration.","solutions":["Set fallback in getStaticPaths to a string locale, null, undefined, or false."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0eb377541648e63402a47b38fee00a8d0ce8f8f1","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}