{"record":{"id":"ceb17895264fcddd","repo":"vercel/turborepo","slug":"generator-qualifiedname-generator-not-found","errorCode":null,"errorMessage":"Generator ${qualifiedName(generator)} not found","messagePattern":"Generator (.+?) not found","errorType":"exception","errorClass":"GeneratorError","httpStatus":null,"severity":"error","filePath":"packages/turbo-gen/src/utils/plop.ts","lineNumber":370,"sourceCode":"  const destBasePath = configPath ?? generator.destBasePath;\n\n  const plop = await createPlopFromConfig(resolvedConfigPath, destBasePath);\n\n  if (!plop) {\n    throw new GeneratorError(\"Unable to load generators\", {\n      type: \"plop_unable_to_load_config\"\n    });\n  }\n\n  let gen: PlopGenerator | undefined;\n  try {\n    gen = plop.getGenerator(generator.name) as PlopGenerator | undefined;\n  } catch {\n    // plop throws when generator not found\n  }\n\n  if (!gen) {\n    throw new GeneratorError(\n      `Generator ${qualifiedName(generator)} not found`,\n      { type: \"plop_generator_not_found\" }\n    );\n  }\n\n  const answers = (await gen.runPrompts(bypassArgs)) as Array<unknown>;\n  const results = await gen.runActions(\n    { ...answers, ...injectTurborepoData({ project, generator: gen }) },\n    {\n      onComment: (comment: string) => {\n        logger.dimmed(comment);\n      }\n    }\n  );\n\n  if (results.failures.length > 0) {\n    for (const f of results.failures) {\n      if (f instanceof Error) {","sourceCodeStart":352,"sourceCodeEnd":388,"githubUrl":"https://github.com/vercel/turborepo/blob/9f94a7d215b3881942527dd526afa3fc650869d5/packages/turbo-gen/src/utils/plop.ts#L352-L388","documentation":"After loading the plop config, turbo-gen looks up the requested generator by name (displayed as `workspace/name`). plop's getGenerator throws (or returns undefined) when no `plop.setGenerator(name, ...)` registered that name, and turbo-gen converts it to GeneratorError `Generator <workspace/name> not found` (type plop_generator_not_found).","triggerScenarios":"Running `turbo gen my-generator` when the loaded config never registers that name; a typo or casing mismatch (plop names are case-sensitive); running with a --config that defines different generators; invoking a workspace-qualified name (`web/build`) for a workspace whose config lacks it.","commonSituations":"Renaming generators without updating docs/scripts; running from a different workspace than the one defining the generator; CI scripts referencing a generator deleted in a refactor.","solutions":["List what is actually available: run `turbo gen` with no name — it shows discovered generators grouped by workspace as `workspace/name`","Compare the exact name against your `plop.setGenerator('<name>', ...)` call, including casing","Ensure you run from (or target via --config) the workspace whose config defines the generator"],"exampleFix":"// turbo/generators/config.ts\nplop.setGenerator('widget', { ... });\n# before\nturbo gen widgt\n# after\nturbo gen widget","handlingStrategy":"validation","validationCode":"import { getCustomGenerators } from './plop';\n\nasync function generatorExists(project: Project, name: string): Promise<boolean> {\n  const gens = await getCustomGenerators({ project });\n  return gens.some(\n    (g) => !(g instanceof Separator) && `${(g as Generator).workspace}/${(g as Generator).name}` === name\n  );\n}","typeGuard":"function isKnownGeneratorName(name: string, registered: string[]): boolean {\n  return registered.includes(name);\n}","tryCatchPattern":"try {\n  await runCustomGenerator({ project, generator });\n} catch (err) {\n  if (err instanceof GeneratorError && err.type === 'plop_generator_not_found') {\n    // list available generators so the user can correct the name\n    const available = await listGenerators(project);\n    throw new Error(`unknown generator — available: ${available.join(', ')}`);\n  }\n  throw err;\n}","preventionTips":["Run bare `turbo gen` to list available `workspace/name` pairs before scripting a specific generator","Keep generator names stable; update dependent scripts in the same commit when renaming","Names are case-sensitive — match the exact string passed to plop.setGenerator"],"tags":["turbo-gen","generator","plop","name-resolution"],"backgroundTag":"generator-not-found","analyzedSha":"9f94a7d215b3881942527dd526afa3fc650869d5","analyzedAt":"2026-08-16T19:47:29.531Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}