{"record":{"id":"996a369de37cd71a","repo":"facebook/docusaurus","slug":"no-docs-version-exist-for-name-name-please-v","errorCode":null,"errorMessage":"No docs version exist for name '${name}', please verify your 'docsVersionDropdown' navbar item versions config.\nAvailable version names:\n- ${versions.map((v) => `${v.name}`).join('\\n- ')}","messagePattern":"No docs version exist for name '(.+?)', please verify your 'docsVersionDropdown' navbar item versions config\\.\nAvailable version names:\n- (.+?)`\\)\\.join\\('\\\\n- '\\)\\}","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/docusaurus-theme-classic/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx","lineNumber":52,"sourceCode":"};\n\nfunction getVersionItems(\n  versions: GlobalVersion[],\n  configs?: PropVersions,\n): VersionItem[] {\n  if (configs) {\n    // Collect all the versions we have\n    const versionMap = new Map<string, GlobalVersion>(\n      versions.map((version) => [version.name, version]),\n    );\n\n    const toVersionItem = (\n      name: string,\n      config?: PropVersionItem,\n    ): VersionItem => {\n      const version = versionMap.get(name);\n      if (!version) {\n        throw new Error(`No docs version exist for name '${name}', please verify your 'docsVersionDropdown' navbar item versions config.\nAvailable version names:\\n- ${versions.map((v) => `${v.name}`).join('\\n- ')}`);\n      }\n      return {version, label: config?.label ?? version.label};\n    };\n\n    if (Array.isArray(configs)) {\n      return configs.map((name) => toVersionItem(name, undefined));\n    } else {\n      return Object.entries(configs).map(([name, config]) =>\n        toVersionItem(name, config),\n      );\n    }\n  } else {\n    return versions.map((version) => ({version, label: version.label}));\n  }\n}\n\nfunction useVersionItems({","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/facebook/docusaurus/blob/3f483e80e326cc646b54b83d564b3f0c4881b9a6/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx#L34-L70","documentation":"Thrown by `DocsVersionDropdownNavbarItem` when a version `name` listed under the navbar item's `versions` config does not match any of the versions Docusaurus actually knows about. The dropdown iterates the configured version names and looks each one up in the global version map; a miss is a config error.","triggerScenarios":"The navbar item's `versions` array/object contains a version name (e.g. `'2.0'`) that is not present among the released/current versions for that docs plugin. The error message lists the actually-available names to help you correct the typo.","commonSituations":"Typo in a version name; referencing a version that was cut/removed; configuring `versions` before running `docusaurus docs:version <name>` to actually create it; mismatch between the `docsPluginId` on the navbar item and the instance whose versions you mean.","solutions":["Read the error's 'Available version names' list and align your `versions` config to those exact strings.","Create the missing version with `docusaurus docs:version <name>` (or the `--plugin-id` variant) before referencing it.","Double-check `docsPluginId` matches the docs instance that owns those versions.","Remove stale version names left over from a docs prune."],"exampleFix":"// before\nnavbar: [{\n  type: 'docsVersionDropdown',\n  versions: { '2.0': {label: 'v2'}, '9.9': {label: 'phantom'} } // 9.9 does not exist\n}]\n// after\nnavbar: [{\n  type: 'docsVersionDropdown',\n  versions: { '2.0': {label: 'v2'}, '1.0': {label: 'v1'} } // both exist\n}]","handlingStrategy":"validation","validationCode":"import {useVersions} from '@docusaurus/plugin-content-docs/client';\nconst versions = useVersions(pluginId);\nconst known = new Set(versions.map(v => v.name));\nconst cfgNames = Array.isArray(cfg) ? cfg : Object.keys(cfg);\nconst invalid = cfgNames.filter(n => !known.has(n));\nif (invalid.length) { /* surface to user, do not pass to dropdown */ }","typeGuard":"function allVersionsExist(names: string[], known: string[]): boolean {\n  const set = new Set(known);\n  return names.every(n => set.has(n));\n}","tryCatchPattern":null,"preventionTips":["Create a version with `docusaurus docs:version <name>` before listing it in `versions`.","Remove version names from `versions` when you delete a version.","Match `docsPluginId` to the owning docs instance."],"tags":["navbar","docs-versioning","config","theme-classic"],"backgroundTag":null,"analyzedSha":"3f483e80e326cc646b54b83d564b3f0c4881b9a6","analyzedAt":"2026-08-12T13:25:04.382Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}