vuejs/vue-cli · error · Error
Plugin ${id} does not have a generator.
Error message
Plugin ${id} does not have a generator. What it means
Thrown during `vue invoke <plugin>` when the plugin is installed and resolved, but it does not export a generator module (i.e., loadModule('<id>/generator') returns null/undefined). The invoke mechanism requires a generator to apply or re-apply the plugin's modifications; without one there is nothing to invoke.
Source
Thrown at packages/@vue/cli/lib/invoke.js:55
return name
}
// full id, scoped short, or default short
if (deps[(name = resolvePluginId(pluginName))]) {
return name
}
}
const id = findPlugin(pkg.devDependencies) || findPlugin(pkg.dependencies)
if (!id) {
throw new Error(
`Cannot resolve plugin ${chalk.yellow(pluginName)} from package.json. ` +
`Did you forget to install it?`
)
}
const pluginGenerator = loadModule(`${id}/generator`, context)
if (!pluginGenerator) {
throw new Error(`Plugin ${id} does not have a generator.`)
}
// resolve options if no command line options (other than --registry) are passed,
// and the plugin contains a prompt module.
// eslint-disable-next-line prefer-const
let { registry, $inlineOptions, ...pluginOptions } = options
if ($inlineOptions) {
try {
pluginOptions = JSON.parse($inlineOptions)
} catch (e) {
throw new Error(`Couldn't parse inline options JSON: ${e.message}`)
}
} else if (!Object.keys(pluginOptions).length) {
let pluginPrompts = loadModule(`${id}/prompts`, context)
if (pluginPrompts) {
const prompt = inquirer.createPromptModule()
if (typeof pluginPrompts === 'function') {View on GitHub (pinned to 7eb93c169c)
Solutions
- Check if the plugin has a generator entry: look for node_modules/<plugin>/generator.js or node_modules/<plugin>/generator/index.js.
- Reinstall the plugin to ensure a complete package: npm install -D <plugin>@latest.
- If the plugin genuinely has no generator, it cannot be invoked — contact the plugin author or use the plugin's own CLI if it has one.
Example fix
# before $ vue invoke some-broken-plugin Error: Plugin some-broken-plugin does not have a generator. # after $ ls node_modules/some-broken-plugin/generator.js # confirm missing $ npm install -D some-broken-plugin@latest # reinstall $ vue invoke some-broken-plugin
Defensive patterns
Strategy: validation
Validate before calling
const { existsSync } = require('fs');
const hasGenerator = existsSync(`node_modules/${pluginId}/generator.js`) ||
existsSync(`node_modules/${pluginId}/generator/index.js`);
if (!hasGenerator) {
console.error(`Plugin ${pluginId} has no generator module and cannot be invoked.`);
} Try / catch
try {
await invoke(pluginName, options);
} catch (e) {
if (e.message.includes('does not have a generator')) {
console.error(`This plugin cannot be invoked. Check node_modules/${pluginName}/generator.js.`);
process.exit(1);
}
throw e;
} Prevention
- Verify the plugin package includes a generator.js or generator/index.js before invoking.
- Reinstall plugins if the package appears incomplete.
- Report missing generators to the plugin maintainer.
When it happens
Trigger: Running `vue invoke <plugin>` on a package that exists in node_modules but has no generator.js, generator/index.js, or generator entry in its package.json. This can happen with malformed, incomplete, or non-standard plugin packages.
Common situations: The plugin package is corrupted, partially published, or is not actually a Vue CLI plugin (just a regular npm package with a similar name). The plugin's main field points elsewhere and no generator subpath exists.
Related errors
- Cannot resolve plugin ${pluginName} from package.json. Did y
- 'url' and 'path' can't be defined at the same time.
- Can't find ${packageName} in package.json
- Couldn't parse inline options JSON: ${e.message}
AI-assisted analysis of vuejs/vue-cli@7eb93c169c (2026-08-13).
Data as JSON: /api/errors/b49a29fa715324aa.
Report an issue: GitHub.