{"record":{"id":"93496078ca01fd9e","repo":"gatsbyjs/gatsby","slug":"the-destination-value-already-exists-please","errorCode":null,"errorMessage":"The destination \"${value}\" already exists. Please choose a different name","messagePattern":"The destination \"(.+?)\" already exists\\. Please choose a different name","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/create-gatsby/src/utils/question-helpers.ts","lineNumber":54,"sourceCode":"      `You have not provided a directory name for your site. Please do so when running with the 'y' flag.`\n    )\n    return false\n  }\n  value = value.trim()\n  if (INVALID_FILENAMES.test(value)) {\n    reporter.warn(\n      `The destination \"${value}\" is not a valid filename. Please try again, avoiding special characters.`\n    )\n    return false\n  }\n  if (process.platform === `win32` && INVALID_WINDOWS.test(value)) {\n    reporter.warn(\n      `The destination \"${value}\" is not a valid Windows filename. Please try another name`\n    )\n    return false\n  }\n  if (fs.existsSync(path.resolve(value))) {\n    reporter.warn(\n      `The destination \"${value}\" already exists. Please choose a different name`\n    )\n    return false\n  }\n  return true\n}\n\n// Enquirer types are not exported and are out of date\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const generateQuestions = (\n  initialFolderName: string,\n  flags: IFlags\n): any => {\n  const siteNameQuestion = {\n    type: `textinput`,\n    name: `project`,\n    message: `What would you like to name the folder where your site will be created?`,\n    hint: path.basename(process.cwd()),","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/create-gatsby/src/utils/question-helpers.ts#L36-L72","documentation":"Validation-helper warning from create-gatsby's project name validator: fs.existsSync resolved the supplied name to an already-existing directory, so scaffolding a new site there would overwrite it. The validator returns false to force a different name.","triggerScenarios":"Thrown at packages/create-gatsby/src/utils/question-helpers.ts:54 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Choose a different site name","Or delete/move the existing directory first"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e85d62f1779e353eaac1753211629a26d123e26c","analyzedAt":"2026-08-26T17:50:09.662Z","contentChangedAt":"2026-08-26T17:50:09.662Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}