{"record":{"id":"be0616e86bdf4489","repo":"facebook/docusaurus","slug":"unknown-docusaurus-vcs-preset-name-process-env","errorCode":null,"errorMessage":"Unknown Docusaurus VCS preset name: ${process.env.DOCUSAURUS_VCS}","messagePattern":"Unknown Docusaurus VCS preset name: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/docusaurus-utils/src/vcs/vcs.ts","lineNumber":42,"sourceCode":"  hardcoded: VcsHardcoded,\n  disabled: VcsDisabled,\n\n  'default-v1': VcsDefaultV1,\n  'default-v2': VcsDefaultV2,\n};\n\nexport const VcsPresetNames = Object.keys(VcsPresets) as VcsPreset[];\n\nexport function findVcsPreset(presetName: string): VcsConfig | undefined {\n  return VcsPresets[presetName as VcsPreset];\n}\n\nexport function getVcsPreset(presetName: VcsPreset): VcsConfig {\n  const vcs = findVcsPreset(presetName);\n  if (vcs) {\n    return vcs;\n  } else {\n    throw new Error(\n      `Unknown Docusaurus VCS preset name: ${process.env.DOCUSAURUS_VCS}`,\n    );\n  }\n}\n\n// Convenient export for writing unit tests depending on VCS\nexport const TEST_VCS = {\n  CREATION_INFO: VCS_HARDCODED_CREATION_INFO,\n  LAST_UPDATE_INFO: VCS_HARDCODED_LAST_UPDATE_INFO,\n  UNTRACKED_FILE_PATH: VCS_HARDCODED_UNTRACKED_FILE_PATH,\n  ...VcsHardcoded,\n};\n","sourceCodeStart":24,"sourceCodeEnd":55,"githubUrl":"https://github.com/facebook/docusaurus/blob/3f483e80e326cc646b54b83d564b3f0c4881b9a6/packages/docusaurus-utils/src/vcs/vcs.ts#L24-L55","documentation":"Thrown by getVcsPreset when the requested VCS preset name does not match any key in the VcsPresets map. Notably the message reports process.env.DOCUSAURUS_VCS rather than the presetName argument, which is misleading if the function is called with a different value — but in practice the argument is normally derived from that env var. Used to switch Docusaurus's version-control backend (e.g. git vs hardcoded).","triggerScenarios":"Setting DOCUSAURUS_VCS to a typo'd or unsupported value, or calling getVcsPreset with an unknown preset name.","commonSituations":"Typos like DOCUSAURUS_VCS=Git (wrong case), experimental values from an old Docusaurus version removed in an upgrade, or copy-pasting a preset name from docs that no longer exists.","solutions":["Check the VcsPresets keys for the supported preset names and use exactly one of them.","Unset DOCUSAURUS_VCS to fall back to the default VCS.","After upgrading Docusaurus, review changelog for renamed/removed VCS presets."],"exampleFix":"// before\nDOCUSAURUS_VCS=github docusaurus build\n// after\nunset DOCUSAURUS_VCS\ndocusaurus build","handlingStrategy":"validation","validationCode":"import {VcsPresetNames} from '@docusaurus/utils';\nconst requested = process.env.DOCUSAURUS_VCS;\nif (requested && !VcsPresetNames.includes(requested as any)) {\n  throw new Error(`Unsupported DOCUSAURUS_VCS=${requested}. Valid: ${VcsPresetNames.join(', ')}`);\n}","typeGuard":"import {VcsPresetNames, type VcsPreset} from '@docusaurus/utils';\nfunction isVcsPreset(name: string): name is VcsPreset {\n  return (VcsPresetNames as string[]).includes(name);\n}","tryCatchPattern":null,"preventionTips":["Validate DOCUSAURUS_VCS against VcsPresetNames before launching the build.","Leave DOCUSAURUS_VCS unset unless you need a non-default VCS.","Re-check VCS preset names after upgrading Docusaurus."],"tags":["vcs","config","env","preset"],"backgroundTag":null,"analyzedSha":"3f483e80e326cc646b54b83d564b3f0c4881b9a6","analyzedAt":"2026-08-12T13:25:04.382Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}