{"record":{"id":"e5e9471304d59ac2","repo":"gatsbyjs/gatsby","slug":"11610","errorCode":"11610","errorMessage":"11610","messagePattern":"11610","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-cli/src/init-starter.ts","lineNumber":296,"sourceCode":"    starter,\n    root\n  )\n\n  const urlObject = url.parse(rootPath)\n\n  if (selectedOtherStarter) {\n    report.info(\n      `Opening the starter library at https://gatsby.dev/starters?v=2...\\nThe starter library has a variety of options for starters you can browse\\n\\nYou can then use the gatsby new command with the link to a repository of a starter you'd like to use, for example:\\ngatsby new ${rootPath} https://github.com/gatsbyjs/gatsby-starter-default`\n    )\n    opn(`https://gatsby.dev/starters?v=2`)\n    return\n  }\n  if (urlObject.protocol && urlObject.host) {\n    const isStarterAUrl =\n      starter && !url.parse(starter).hostname && !url.parse(starter).protocol\n\n    if (/gatsby-starter/gi.test(rootPath) && isStarterAUrl) {\n      report.panic({\n        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)) {","sourceCodeStart":278,"sourceCodeEnd":314,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/8b06340921ffdf23125a365b9c9923690cb62ce6/packages/gatsby-cli/src/init-starter.ts#L278-L314","documentation":"Structured error 11610 from `gatsby new`. Fires when the resolved `rootPath` parses as a URL (has protocol and host) AND contains the string `gatsby-starter`, while the `starter` argument itself is not a URL. This pattern indicates the user swapped the two positional arguments of `gatsby new`, putting the starter URL in the project-name slot.","triggerScenarios":"Invoking `gatsby new https://github.com/gatsbyjs/gatsby-starter-blog my-blog` in the wrong order, or `gatsby new my-blog https://.../gatsby-starter-blog` where args got reordered so the URL lands in rootPath. The check `/gatsby-starter/gi.test(rootPath) && isStarterAUrl` detects the swapped-args case specifically.","commonSituations":"Misreading the `gatsby new <root> [starter]` argument order; copy-pasting a starter URL into the first prompt/position; shell aliases or scripts that reorder the args.","solutions":["Use the correct argument order: `gatsby new <project-name> <starter-url>`.","If you only want a starter, run `gatsby new <project-name>` and pick the starter interactively.","Double-check the first positional is a local directory name, not a URL."],"exampleFix":"# before (swapped)\ngatsby new https://github.com/gatsbyjs/gatsby-starter-blog my-blog\n\n# after\ngatsby new my-blog https://github.com/gatsbyjs/gatsby-starter-blog","handlingStrategy":"validation","validationCode":"const url = require('url')\nfunction assertNewArgs(rootPath, starter) {\n  const r = url.parse(rootPath)\n  if (r.protocol && r.host) throw new Error('First arg must be a project name, not a URL')\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Remember the order: `gatsby new <project-name> [starter-url]`.","Use interactive mode (`gatsby new`) to avoid arg ordering mistakes.","Never put a URL in the project-name slot."],"tags":["cli","gatsby-new","arguments","starter","validation"],"backgroundTag":null,"analyzedSha":"8b06340921ffdf23125a365b9c9923690cb62ce6","analyzedAt":"2026-08-13T02:36:21.405Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}