{"record":{"id":"b49a29fa715324aa","repo":"vuejs/vue-cli","slug":"plugin-id-does-not-have-a-generator","errorCode":null,"errorMessage":"Plugin ${id} does not have a generator.","messagePattern":"Plugin (.+?) does not have a generator\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@vue/cli/lib/invoke.js","lineNumber":55,"sourceCode":"      return name\n    }\n    // full id, scoped short, or default short\n    if (deps[(name = resolvePluginId(pluginName))]) {\n      return name\n    }\n  }\n\n  const id = findPlugin(pkg.devDependencies) || findPlugin(pkg.dependencies)\n  if (!id) {\n    throw new Error(\n      `Cannot resolve plugin ${chalk.yellow(pluginName)} from package.json. ` +\n        `Did you forget to install it?`\n    )\n  }\n\n  const pluginGenerator = loadModule(`${id}/generator`, context)\n  if (!pluginGenerator) {\n    throw new Error(`Plugin ${id} does not have a generator.`)\n  }\n\n  // resolve options if no command line options (other than --registry) are passed,\n  // and the plugin contains a prompt module.\n  // eslint-disable-next-line prefer-const\n  let { registry, $inlineOptions, ...pluginOptions } = options\n  if ($inlineOptions) {\n    try {\n      pluginOptions = JSON.parse($inlineOptions)\n    } catch (e) {\n      throw new Error(`Couldn't parse inline options JSON: ${e.message}`)\n    }\n  } else if (!Object.keys(pluginOptions).length) {\n    let pluginPrompts = loadModule(`${id}/prompts`, context)\n    if (pluginPrompts) {\n      const prompt = inquirer.createPromptModule()\n\n      if (typeof pluginPrompts === 'function') {","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/vuejs/vue-cli/blob/7eb93c169c7520935252e2473387f923ef80d856/packages/@vue/cli/lib/invoke.js#L37-L73","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"# before\n$ vue invoke some-broken-plugin\nError: Plugin some-broken-plugin does not have a generator.\n# after\n$ ls node_modules/some-broken-plugin/generator.js  # confirm missing\n$ npm install -D some-broken-plugin@latest  # reinstall\n$ vue invoke some-broken-plugin","handlingStrategy":"validation","validationCode":"const { existsSync } = require('fs');\nconst hasGenerator = existsSync(`node_modules/${pluginId}/generator.js`) ||\n  existsSync(`node_modules/${pluginId}/generator/index.js`);\nif (!hasGenerator) {\n  console.error(`Plugin ${pluginId} has no generator module and cannot be invoked.`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  await invoke(pluginName, options);\n} catch (e) {\n  if (e.message.includes('does not have a generator')) {\n    console.error(`This plugin cannot be invoked. Check node_modules/${pluginName}/generator.js.`);\n    process.exit(1);\n  }\n  throw e;\n}","preventionTips":["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."],"tags":["invoke","plugin","generator","package-structure"],"backgroundTag":null,"analyzedSha":"7eb93c169c7520935252e2473387f923ef80d856","analyzedAt":"2026-08-13T10:13:37.803Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}