{"record":{"id":"f07d5a5d374f9d9e","repo":"Humanizr/Humanizer","slug":"published-documentation-version-is-invalid-vers","errorCode":null,"errorMessage":"Published documentation version is invalid: ${versionName}","messagePattern":"Published documentation version is invalid: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"website/docusaurus.config.ts","lineNumber":34,"sourceCode":"if (!latestStable || !preview) {\n  throw new Error('The documentation version manifest is incomplete.');\n}\n\nconst redirects = redirectInventory.redirects.map(({from, to}) => ({\n  from: from.filter((source) => !source.startsWith('/.')),\n  to,\n}));\n\nconst publishedVersions: Record<\n  string,\n  {label: string; path: string; banner: 'none'; badge: boolean}\n> = Object.fromEntries(\n  nativeVersions.map((versionName) => {\n    const version = versionManifest.versions.find(\n      (candidate) => candidate.version === versionName,\n    );\n    if (!version?.published) {\n      throw new Error(`Published documentation version is invalid: ${versionName}`);\n    }\n\n    return [\n      versionName,\n      {\n        label: version.label,\n        path: version.route,\n        banner: 'none',\n        badge: true,\n      },\n    ];\n  }),\n);\n\nconst config: Config = {\n  title: 'Humanizer',\n  tagline: 'Human-friendly text for .NET',\n  favicon: 'img/logo.png',","sourceCodeStart":16,"sourceCodeEnd":52,"githubUrl":"https://github.com/Humanizr/Humanizer/blob/ffc2b77c0f30d2fb176875841424379319d0ae9b/website/docusaurus.config.ts#L16-L52","documentation":"For every name listed in website/versions.json, Docusaurus looks up the matching entry in humanizer-versions.json and requires it to exist and have published:true (docusaurus.config.ts:29-35). A mismatch breaks the version dropdown because a published version folder has no manifest metadata.","triggerScenarios":"versions.json lists a version folder (e.g. '2.10.0') that is absent from humanizer-versions.json, or is present but has published:false or published omitted.","commonSituations":"Adding a versioned docs folder under website/versioned_docs but forgetting to publish its manifest entry; marking a yanked version's published:false while it still appears in versions.json; out-of-order sync between the versioned docs generator and the manifest.","solutions":["Find the version name in the error message, then confirm it exists in humanizer-versions.json with \"published\": true.","If the version folder was removed, delete the matching entry from website/versions.json.","Re-run the version snapshot/release tool that regenerates both versions.json and humanizer-versions.json together.","Ensure published is a boolean true, not the string \"true\"."],"exampleFix":"// before\n// versions.json:  [\"2.10.0\"]\n// humanizer-versions.json: no 2.10.0 entry  -> throws\n// after\n// humanizer-versions.json gets:\n{ \"version\": \"2.10.0\", \"label\": \"2.10.0\", \"route\": \"2.10.0\", \"published\": true }","handlingStrategy":"validation","validationCode":"// Run before `docusaurus build`\nimport manifest from './website/humanizer-versions.json' assert { type: 'json' };\nimport nativeVersions from './website/versions.json' assert { type: 'json' };\nconst byVersion = new Map(manifest.versions.map(v => [v.version, v]));\nfor (const name of nativeVersions) {\n  const entry = byVersion.get(name);\n  if (!entry || entry.published !== true) {\n    console.error(`Published documentation version is invalid: ${name}`);\n    process.exit(1);\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never edit versions.json and humanizer-versions.json independently; regenerate both from the release tool.","When yanking a version, remove it from versions.json in the same commit that sets published:false.","Add the cross-file assertion above as a prebuild step."],"tags":["docusaurus","documentation","build-config","typescript","version-manifest"],"backgroundTag":null,"analyzedSha":"ffc2b77c0f30d2fb176875841424379319d0ae9b","analyzedAt":"2026-08-13T21:42:34.584Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}