Humanizr/Humanizer · error · Error

Published documentation version is invalid: ${versionName}

Error message

Published documentation version is invalid: ${versionName}

What it means

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.

Source

Thrown at website/docusaurus.config.ts:34

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}`);
    }

    return [
      versionName,
      {
        label: version.label,
        path: version.route,
        banner: 'none',
        badge: true,
      },
    ];
  }),
);

const config: Config = {
  title: 'Humanizer',
  tagline: 'Human-friendly text for .NET',
  favicon: 'img/logo.png',

View on GitHub (pinned to ffc2b77c0f)

Solutions

  1. Find the version name in the error message, then confirm it exists in humanizer-versions.json with "published": true.
  2. If the version folder was removed, delete the matching entry from website/versions.json.
  3. Re-run the version snapshot/release tool that regenerates both versions.json and humanizer-versions.json together.
  4. Ensure published is a boolean true, not the string "true".

Example fix

// before
// versions.json:  ["2.10.0"]
// humanizer-versions.json: no 2.10.0 entry  -> throws
// after
// humanizer-versions.json gets:
{ "version": "2.10.0", "label": "2.10.0", "route": "2.10.0", "published": true }
Defensive patterns

Strategy: validation

Validate before calling

// Run before `docusaurus build`
import manifest from './website/humanizer-versions.json' assert { type: 'json' };
import nativeVersions from './website/versions.json' assert { type: 'json' };
const byVersion = new Map(manifest.versions.map(v => [v.version, v]));
for (const name of nativeVersions) {
  const entry = byVersion.get(name);
  if (!entry || entry.published !== true) {
    console.error(`Published documentation version is invalid: ${name}`);
    process.exit(1);
  }
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of Humanizr/Humanizer@ffc2b77c0f (2026-08-13). Data as JSON: /api/errors/f07d5a5d374f9d9e. Report an issue: GitHub.