gatsbyjs/gatsby · error
11611
11611
Error message
11611
What it means
Structured error 11611 from `gatsby new`. Fires when `rootPath` parses as a URL (has protocol and host) but does not match the 11610 swapped-args pattern. The project name slot contains a URL, which is not a valid local directory, so scaffolding refuses to proceed.
Source
Thrown at packages/gatsby-cli/src/init-starter.ts:305
)
opn(`https://gatsby.dev/starters?v=2`)
return
}
if (urlObject.protocol && urlObject.host) {
const isStarterAUrl =
starter && !url.parse(starter).hostname && !url.parse(starter).protocol
if (/gatsby-starter/gi.test(rootPath) && isStarterAUrl) {
report.panic({
id: `11610`,
context: {
starter,
rootPath,
},
})
return
}
report.panic({
id: `11611`,
context: {
rootPath,
},
})
return
}
if (!isValid(rootPath)) {
report.panic({
id: `11612`,
context: {
path: sysPath.resolve(rootPath),
},
})
return
}
View on GitHub (pinned to 8b06340921)
Solutions
- Provide a valid local directory name as the first argument: `gatsby new my-site`.
- If you intended to clone a starter, put its URL second: `gatsby new my-site <starter-url>`.
- Remove any `https://` prefix from the project name.
Example fix
# before gatsby new https://example.com # after gatsby new my-site
Defensive patterns
Strategy: validation
Validate before calling
const url = require('url')
function isValidRoot(p) { return !url.parse(p).protocol } Type guard
const isNonUrlPath = (v: unknown): v is string => typeof v === 'string' && !/:\/\//.test(v)
Prevention
- Pass a plain directory name as the first argument to `gatsby new`.
- Reserve URLs for the optional second (starter) argument.
- Strip `https://` from project names.
When it happens
Trigger: The first positional argument to `gatsby new` is a URL or URL-like string (e.g. `gatsby new https://example.com`). Since a URL cannot be a filesystem directory, `initStarter` panics.
Common situations: Passing a URL as the project name; misunderstanding the `gatsby new` argument order; copy-paste error where the starter URL goes into the root slot.
Related errors
- 11612
- 11610
- 11613
- Something went wrong when trying to add the plugins to the p
- starter ${starterPath} doesn't exist
AI-assisted analysis of gatsbyjs/gatsby@8b06340921 (2026-08-13).
Data as JSON: /api/errors/e5875190f10bae78.
Report an issue: GitHub.