{"record":{"id":"cc994629beb0b4db","repo":"gatsbyjs/gatsby","slug":"11612","errorCode":"11612","errorMessage":"11612","messagePattern":"11612","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-cli/src/init-starter.ts","lineNumber":315,"sourceCode":"        id: `11610`,\n        context: {\n          starter,\n          rootPath,\n        },\n      })\n      return\n    }\n    report.panic({\n      id: `11611`,\n      context: {\n        rootPath,\n      },\n    })\n    return\n  }\n\n  if (!isValid(rootPath)) {\n    report.panic({\n      id: `11612`,\n      context: {\n        path: sysPath.resolve(rootPath),\n      },\n    })\n    return\n  }\n\n  if (existsSync(sysPath.join(rootPath, `package.json`))) {\n    report.panic({\n      id: `11613`,\n      context: {\n        rootPath,\n      },\n    })\n    return\n  }\n","sourceCodeStart":297,"sourceCodeEnd":333,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/8b06340921ffdf23125a365b9c9923690cb62ce6/packages/gatsby-cli/src/init-starter.ts#L297-L333","documentation":"Structured error 11612 from `gatsby new`. Fires when `isValid(rootPath)` returns false, meaning the chosen project directory name is not a valid filesystem path/name (illegal characters, reserved names, empty). Gatsby refuses to create a project in an invalid location.","triggerScenarios":"Passing a rootPath with characters that fail the `isValid` check (e.g. shell metacharacters, control chars, an empty string, or a path segment that is invalid on the target OS).","commonSituations":"Project name with spaces/special characters not handled by the validator; trailing slashes; leading dashes interpreted as flags; OS-specific reserved names (Windows: `CON`, `PRN`, etc.).","solutions":["Choose a simple project name: lowercase letters, digits, and hyphens only (e.g. `my-gatsby-site`).","Avoid shell metacharacters, colons, and leading dashes.","If a custom path is needed, ensure each segment is a valid directory name on your OS."],"exampleFix":"# before\ngatsby new \"my site!\"\n\n# after\ngatsby new my-site","handlingStrategy":"validation","validationCode":"// Mirror the validator: simple, safe directory name\nfunction isValidName(name: string): boolean {\n  return /^[A-Za-z0-9._-]+$/.test(name) && !name.startsWith('-') && name.trim().length > 0\n}","typeGuard":"const isValidPathName = (v: unknown): v is string =>\n  typeof v === 'string' && /^[A-Za-z0-9._-]+$/.test(v) && !v.startsWith('-')","tryCatchPattern":null,"preventionTips":["Use lowercase letters, digits, and hyphens for project names.","Avoid spaces, colons, and shell metacharacters.","Avoid OS-reserved names (CON, PRN, etc.) on Windows."],"tags":["cli","gatsby-new","path-validation","arguments"],"backgroundTag":null,"analyzedSha":"8b06340921ffdf23125a365b9c9923690cb62ce6","analyzedAt":"2026-08-13T02:36:21.405Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}