{"record":{"id":"7dc36a23b9ba11ee","repo":"vercel/turborepo","slug":"generator-generator-not-found","errorCode":null,"errorMessage":"Generator \"${generator}\" not found","messagePattern":"Generator \"(.+?)\" not found","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/turbo-gen/src/commands/run/prompts.ts","lineNumber":62,"sourceCode":"  }\n\n  return undefined;\n}\n\nexport async function customGenerators({\n  generators,\n  generator\n}: {\n  generators: Array<Generator | Separator>;\n  generator?: string;\n}): Promise<{ selectedGenerator: Generator }> {\n  if (generator) {\n    const match = findGenerator(generators, generator);\n    if (match) {\n      return { selectedGenerator: match };\n    }\n\n    logger.warn(`Generator \"${generator}\" not found`);\n    logger.log();\n  }\n\n  const selectedGenerator = await select<Generator>({\n    message: `Select generator to run`,\n    choices: generators.map((gen) => {\n      if (gen instanceof Separator) {\n        return gen;\n      }\n      const qName = qualifiedName(gen);\n      return {\n        name: gen.description ? `  ${qName}: ${gen.description}` : `  ${qName}`,\n        value: gen\n      };\n    })\n  });\n\n  return { selectedGenerator };","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/vercel/turborepo/blob/f9245100cf0d31d96628804ead485f6bf226e55a/packages/turbo-gen/src/commands/run/prompts.ts#L44-L80","documentation":"turbo-gen could not find any generator matching the name passed on the command line: findGenerator returned no match, so it warns and falls back to the interactive generator picker. Generators are discovered from the repository's workspaces, including any opted in via turbo.json's `generator.workspaces` configuration.","triggerScenarios":"`turbo generate foo` where no generator config has name 'foo' — a typo, a generator that lives in a package not covered by discovery/generator.workspaces, or running from a directory where nothing is found.","commonSituations":"Typos in generator names; forgetting to add the defining package to `generator.workspaces`; running turbo-gen from a subdirectory instead of the repo root.","solutions":["Run `turbo generate` without a name and inspect the picker to see the exact names available","Fix the typo or use the qualified name shown in the picker","Add the package containing the generator to `generator.workspaces` in turbo.json","Run from the repository root so discovery scans all workspaces"],"exampleFix":"# before\nturbo generate util   # no generator named 'util'\n\n# after: turbo.json\n\"generator\": { \"workspaces\": [\"tooling/generators/*\"] }\n# then\nturbo generate util","handlingStrategy":"validation","validationCode":"// Ensure the requested generator exists before running non-interactively\nconst found = generators.some(\n  g => !(g instanceof Separator) && (g.name === name || qualifiedName(g) === name)\n);\nif (!found) {\n  console.error(`unknown generator '${name}'; available:`, generators.map(qualifiedName));\n  process.exit(1);\n}","typeGuard":"function isGenerator(x: Generator | Separator): x is Generator {\n  return !(x instanceof Separator);\n}","tryCatchPattern":null,"preventionTips":["List available generators once (run `turbo generate` and inspect the picker) to learn exact names","Add packages that define generators to turbo.json `generator.workspaces`","Always use qualified names in automation to avoid name-drift breakage"],"tags":["turbo-generate","generators","discovery"],"backgroundTag":"generator-not-found","analyzedSha":"f9245100cf0d31d96628804ead485f6bf226e55a","analyzedAt":"2026-08-17T10:46:15.696Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}