{"record":{"id":"940533b0649bdecb","repo":"Humanizr/Humanizer","slug":"the-documentation-version-manifest-is-incomplete","errorCode":null,"errorMessage":"The documentation version manifest is incomplete.","messagePattern":"The documentation version manifest is incomplete\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"website/docusaurus.config.ts","lineNumber":17,"sourceCode":"import type {Config} from '@docusaurus/types';\nimport type * as Preset from '@docusaurus/preset-classic';\nimport {themes as prismThemes} from 'prism-react-renderer';\nimport versionManifest from './humanizer-versions.json';\nimport redirectInventory from './redirects.json';\nimport nativeVersions from './versions.json';\n\nconst repositoryUrl = 'https://github.com/Humanizr/Humanizer';\nconst latestStable = versionManifest.versions.find(\n  (version) => version.latestStable,\n);\nconst preview = versionManifest.versions.find(\n  (version) => version.version === 'current',\n);\n\nif (!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    }","sourceCodeStart":1,"sourceCodeEnd":35,"githubUrl":"https://github.com/Humanizr/Humanizer/blob/ffc2b77c0f30d2fb176875841424379319d0ae9b/website/docusaurus.config.ts#L1-L35","documentation":"Thrown at Docusaurus config load time when the version manifest (website/humanizer-versions.json) does not contain both a version flagged latestStable:true and a version whose version field is 'current'. The config (docusaurus.config.ts:9-14) derives the docs dropdown's last version and the preview/'current' version from these two entries, so the site cannot be built without them.","triggerScenarios":"Docusaurus imports humanizer-versions.json, finds no entry with latestStable:true, or no entry with version === 'current' (lines 9-14), and throws at module evaluation when latestStable or preview is undefined.","commonSituations":"Cutting a release and forgetting to mark the new version latestStable; renaming 'current' to the new version string; hand-editing humanizer-versions.json and dropping a key; rebasing a docs change onto a manifest that has not yet been regenerated.","solutions":["Open website/humanizer-versions.json and confirm one entry has \"version\": \"current\" and another has \"latestStable\": true.","Regenerate the manifest from the release pipeline rather than editing it by hand.","If you intentionally removed the preview entry, restore it or adjust the config to stop requiring it.","Validate the JSON is well-formed and the versions array is non-empty."],"exampleFix":"// before (humanizer-versions.json)\n{ \"versions\": [ { \"version\": \"2.14.1\", \"published\": true } ] }\n// after\n{ \"versions\": [\n  { \"version\": \"current\", \"label\": \"Next\", \"route\": \"next\", \"published\": true },\n  { \"version\": \"2.14.1\", \"label\": \"2.14.1\", \"route\": \"2.14.1\", \"published\": true, \"latestStable\": true }\n] }","handlingStrategy":"validation","validationCode":"// Run before `docusaurus build` / `docusaurus start`\nimport manifest from './website/humanizer-versions.json' assert { type: 'json' };\nconst v = manifest.versions ?? [];\nif (!v.some(x => x.latestStable === true) || !v.some(x => x.version === 'current')) {\n  console.error('Manifest needs one latestStable:true entry and one version:\"current\" entry');\n  process.exit(1);\n}","typeGuard":"// (config authors) assert the shape at build time\nfunction isVersionEntry(x: unknown): x is { version: string; published?: boolean; latestStable?: boolean; label: string; route: string } {\n  return typeof x === 'object' && x !== null && typeof (x as any).version === 'string';\n}","tryCatchPattern":null,"preventionTips":["Treat humanizer-versions.json as build output: regenerate it from the release script instead of editing it.","Add a prebuild assertion (see validationCode) so CI fails before Docusaurus starts.","Keep the 'current' preview entry in the manifest even between releases."],"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"}