vercel/turborepo · warning
Generator "${generator}" not found
Error message
Generator "${generator}" not found What it means
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.
Source
Thrown at packages/turbo-gen/src/commands/run/prompts.ts:62
}
return undefined;
}
export async function customGenerators({
generators,
generator
}: {
generators: Array<Generator | Separator>;
generator?: string;
}): Promise<{ selectedGenerator: Generator }> {
if (generator) {
const match = findGenerator(generators, generator);
if (match) {
return { selectedGenerator: match };
}
logger.warn(`Generator "${generator}" not found`);
logger.log();
}
const selectedGenerator = await select<Generator>({
message: `Select generator to run`,
choices: generators.map((gen) => {
if (gen instanceof Separator) {
return gen;
}
const qName = qualifiedName(gen);
return {
name: gen.description ? ` ${qName}: ${gen.description}` : ` ${qName}`,
value: gen
};
})
});
return { selectedGenerator };View on GitHub (pinned to f9245100cf)
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
Example fix
# before
turbo generate util # no generator named 'util'
# after: turbo.json
"generator": { "workspaces": ["tooling/generators/*"] }
# then
turbo generate util Defensive patterns
Strategy: validation
Validate before calling
// Ensure the requested generator exists before running non-interactively
const found = generators.some(
g => !(g instanceof Separator) && (g.name === name || qualifiedName(g) === name)
);
if (!found) {
console.error(`unknown generator '${name}'; available:`, generators.map(qualifiedName));
process.exit(1);
} Type guard
function isGenerator(x: Generator | Separator): x is Generator {
return !(x instanceof Separator);
} Prevention
- 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
When it happens
Trigger: `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.
Common situations: Typos in generator names; forgetting to add the defining package to `generator.workspaces`; running turbo-gen from a subdirectory instead of the repo root.
Related errors
- Multiple generators named "${name}" found. Use a qualified n
- config_directory_already_exists
- lockfile should be in repo
- Some manual modifications may be required.
- non-root
AI-assisted analysis of vercel/turborepo@f9245100cf (2026-08-17).
Data as JSON: /api/errors/7dc36a23b9ba11ee.
Report an issue: GitHub.