Humanizr/Humanizer · error · Error
The documentation version manifest is incomplete.
Error message
The documentation version manifest is incomplete.
What it means
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.
Source
Thrown at website/docusaurus.config.ts:17
import type {Config} from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
import {themes as prismThemes} from 'prism-react-renderer';
import versionManifest from './humanizer-versions.json';
import redirectInventory from './redirects.json';
import nativeVersions from './versions.json';
const repositoryUrl = 'https://github.com/Humanizr/Humanizer';
const latestStable = versionManifest.versions.find(
(version) => version.latestStable,
);
const preview = versionManifest.versions.find(
(version) => version.version === 'current',
);
if (!latestStable || !preview) {
throw new Error('The documentation version manifest is incomplete.');
}
const redirects = redirectInventory.redirects.map(({from, to}) => ({
from: from.filter((source) => !source.startsWith('/.')),
to,
}));
const publishedVersions: Record<
string,
{label: string; path: string; banner: 'none'; badge: boolean}
> = Object.fromEntries(
nativeVersions.map((versionName) => {
const version = versionManifest.versions.find(
(candidate) => candidate.version === versionName,
);
if (!version?.published) {
throw new Error(`Published documentation version is invalid: ${versionName}`);
}View on GitHub (pinned to ffc2b77c0f)
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.
Example fix
// before (humanizer-versions.json)
{ "versions": [ { "version": "2.14.1", "published": true } ] }
// after
{ "versions": [
{ "version": "current", "label": "Next", "route": "next", "published": true },
{ "version": "2.14.1", "label": "2.14.1", "route": "2.14.1", "published": true, "latestStable": true }
] } Defensive patterns
Strategy: validation
Validate before calling
// Run before `docusaurus build` / `docusaurus start`
import manifest from './website/humanizer-versions.json' assert { type: 'json' };
const v = manifest.versions ?? [];
if (!v.some(x => x.latestStable === true) || !v.some(x => x.version === 'current')) {
console.error('Manifest needs one latestStable:true entry and one version:"current" entry');
process.exit(1);
} Type guard
// (config authors) assert the shape at build time
function isVersionEntry(x: unknown): x is { version: string; published?: boolean; latestStable?: boolean; label: string; route: string } {
return typeof x === 'object' && x !== null && typeof (x as any).version === 'string';
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
AI-assisted analysis of Humanizr/Humanizer@ffc2b77c0f (2026-08-13).
Data as JSON: /api/errors/940533b0649bdecb.
Report an issue: GitHub.