{"record":{"id":"70b3f8c560e3ba66","repo":"quasarframework/quasar","slug":"app-extension-has-no-command-called-cmd","errorCode":null,"errorMessage":"App Extension has no command called \"${cmd}\"","messagePattern":"App Extension has no command called \"(.+?)\"","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app-vite/lib/cmd/run.js","lineNumber":71,"sourceCode":"  if (Object.keys(hooks.commands).length === 0) {\n    ext.logger.warn(`App Extension has no commands registered`)\n    return\n  }\n\n  const cmdList = Object.keys(hooks.commands).join(' | ')\n  ext.logger.log(`Command list: ${cmdList}`)\n}\n\nif (!cmd) {\n  list()\n  process.exit(0)\n}\n\nconst fn = hooks.commands[cmd]\nif (!fn) {\n  list()\n  warn()\n  ext.logger.warn(`App Extension has no command called \"${cmd}\"`)\n  warn()\n  process.exit(1)\n}\n\next.logger.log(`Running App Extension command \"${cmd}\"`)\nlog()\n\nprocess.argv = [\n  ...process.argv.slice(0, 2),\n  ...process.argv.slice(4).filter(arg => arg !== '--no-color')\n]\n\nawait fn(process.argv)\n","sourceCodeStart":53,"sourceCodeEnd":85,"githubUrl":"https://github.com/quasarframework/quasar/blob/4841521b5f635a971eb9e2710e5542efd194691b/app-vite/lib/cmd/run.js#L53-L85","documentation":"`quasar run <extId> <cmd>` invokes a command registered by the App Extension. When the requested command name is not present in `hooks.commands`, the CLI prints the available command list, warns with the offending name and exits 1. This prevents silently executing nothing.","triggerScenarios":"Running `quasar run <extId> <cmd>` where `hooks.commands[cmd]` is undefined — the extension is installed but exposes no command with that exact key (run.js:68-74).","commonSituations":"Typo or wrong casing in the command name; calling a command from an extension version that renamed it; copying a `quasar run` invocation from another project's docs.","solutions":["Use a listed command — the CLI prints `Command list: a | b | c` right before this warning; pick from those.","Run `quasar run <extId>` with no command to re-list valid commands.","Update the extension if its current version should provide the command: `quasar ext update <extId>`."],"exampleFix":"// before\nquasar run @quasar/icon-genie build   # no such command\n// after\nquasar run @quasar/icon-genie        # lists commands, then:\nquasar run @quasar/icon-genie generate","handlingStrategy":"validation","validationCode":"// discover valid commands first\nconst list = execSync(`quasar run ${extId}`).toString();\nconst cmds = (list.match(/Command list: (.*)/) || [])[1]?.split('|').map(s => s.trim()) ?? [];\nif (!cmds.includes(cmd)) throw new Error(`unknown command ${cmd}; valid: ${cmds}`);","typeGuard":null,"tryCatchPattern":"try {\n  execSync(`quasar run ${extId} ${cmd}`, { stdio: 'inherit' });\n} catch (err) {\n  if (String(err.stderr).includes('has no command called')) {\n    console.error(execSync(`quasar run ${extId}`).toString()); // print valid list\n  } else throw err;\n}","preventionTips":["Run `quasar run <extId>` without a command to list valid commands first.","Copy command names exactly (case-sensitive) from the extension docs.","Pin/upgrade the extension version matching your documentation."],"tags":["cli","app-extension","unknown-command"],"backgroundTag":"unknown-command","analyzedSha":"4841521b5f635a971eb9e2710e5542efd194691b","analyzedAt":"2026-08-30T01:13:14.944Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}