facebook/docusaurus · error · Error
VCS config preset name '${input}' is not valid.
Error message
VCS config preset name '${input}' is not valid. What it means
Thrown by the VCS (version-control system) config validator when the user passes a string preset name that is not in the allowed `VcsPresetNames` list. The VCS config field accepts either a known preset string, a boolean, or a full custom object — any other string is rejected.
Source
Thrown at packages/docusaurus/src/server/configValidation.ts:363
// the future.v4.siteStorageNamespacing flag
namespace: Joi.alternatives().try(Joi.string(), Joi.boolean()),
})
.optional()
.default({type: DEFAULT_STORAGE_CONFIG.type});
const VCS_CONFIG_OBJECT_SCHEMA = Joi.object<VcsConfig>({
// All the fields are required on purpose
// You either provide a full VCS config or nothing
initialize: Joi.function().maxArity(1).required(),
getFileCreationInfo: Joi.function().arity(1).required(),
getFileLastUpdateInfo: Joi.function().arity(1).required(),
});
const VCS_CONFIG_SCHEMA = Joi.custom((input) => {
if (typeof input === 'string') {
const presetName = input as VcsPreset;
if (!VcsPresetNames.includes(presetName)) {
throw new Error(`VCS config preset name '${input}' is not valid.`);
}
return getVcsPreset(presetName);
}
if (typeof input === 'boolean') {
// We return the boolean on purpose
// We'll normalize it to a real VcsConfig later
// This is annoying, but we have to read the future flag to switch to the
// new "default-v2" config (not easy to do it here)
return input;
}
const {error, value} = VCS_CONFIG_OBJECT_SCHEMA.validate(input);
if (error) {
throw error;
}
return value;
}).default(true);
const FUTURE_CONFIG_SCHEMA = Joi.object<View on GitHub (pinned to 3f483e80e3)
Solutions
- Use a valid preset name — check `VcsPresetNames` in `configValidation.ts` (or the docs) for the current allow-list (commonly `default`, `default-v2`, etc.).
- If you need custom behavior, pass a full VCS object with `initialize`, `getFileCreationInfo`, and `getFileLastUpdateInfo` functions instead of a string.
- Pass `vcs: false` (or `true`) to use the boolean form.
- Upgrade or downgrade Docusaurus to match the preset name you intend to use.
Example fix
// before
export default { vcs: 'defualt' }; // typo
// after
export default { vcs: 'default' }; Defensive patterns
Strategy: validation
Validate before calling
if (typeof input === 'string' && !VcsPresetNames.includes(input as VcsPreset)) {
throw new Error(`Invalid VCS preset '${input}'. Valid: ${VcsPresetNames.join(', ')}`);
} Type guard
function isVcsPresetName(name: unknown, valid: readonly string[]): name is VcsPreset {
return typeof name === 'string' && valid.includes(name);
} Prevention
- Import `VcsPresetNames` from Docusaurus and reuse it as the source of truth in your config tooling.
- Prefer the boolean or full-object form unless you specifically need a preset.
- Check the allow-list per Docusaurus version when upgrading.
When it happens
Trigger: Setting `vcs: '<preset>'` (or the future-flag equivalent) in `docusaurus.config.js` where `<preset>` is not one of the recognized preset names enumerated in `VcsPresetNames`.
Common situations: Typo in the preset name (e.g. `defualt` instead of `default`); using a preset name from a newer/older Docusaurus version; copy-pasting a preset that only exists with certain future flags enabled.
Related errors
- ${JSON.stringify(redirect)} => Validation error: ${error.mes
- Swizzle config does not match expected schema: ${result.erro
- ${formattedError}
- Unexpected "reportingSeverity" value: ${reportingSeverity}.
- Invalid sidebars file. The document with id "${docId}" was u
AI-assisted analysis of facebook/docusaurus@3f483e80e3 (2026-08-12).
Data as JSON: /api/errors/0844a83202ff6b06.
Report an issue: GitHub.