{"record":{"id":"052b07aa03c54ca9","repo":"gatsbyjs/gatsby","slug":"the-destination-value-is-not-a-valid-filename","errorCode":null,"errorMessage":"The destination \"${value}\" is not a valid filename. Please try again, avoiding special characters.","messagePattern":"The destination \"(.+?)\" is not a valid filename\\. Please try again, avoiding special characters\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/create-gatsby/src/utils/question-helpers.ts","lineNumber":42,"sourceCode":"    return entries\n  }\n\n  const none = { name: `none`, message: `No (or I'll add it later)` }\n  const divider = { name: `–`, role: `separator`, message: `–` }\n\n  return [none, divider, ...entries]\n}\n\nexport function validateProjectName(value: string): boolean {\n  if (!value) {\n    reporter.warn(\n      `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}","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/create-gatsby/src/utils/question-helpers.ts#L24-L60","documentation":"Validation-helper warning from create-gatsby's project name validator: after trimming, the supplied directory name matched the INVALID_FILENAMES regex (characters invalid on filesystems, e.g. control or special characters). The validator returns false so the name is rejected.","triggerScenarios":"Thrown at packages/create-gatsby/src/utils/question-helpers.ts:42 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Choose a directory name without special characters (letters, digits, dashes, underscores)"],"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-14T05:17:10.506Z"}