{"record":{"id":"fa540a0aa62a969b","repo":"quasarframework/quasar","slug":"wrong-number-of-parameters-argv-length","errorCode":null,"errorMessage":"Wrong number of parameters (${argv._.length}).","messagePattern":"Wrong number of parameters \\((.+?)\\)\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app-vite/lib/cmd/ext.js","lineNumber":49,"sourceCode":"\n  Options\n    --no-color   Disable colored output\n    --help, -h   Displays this message\n  `)\n}\n\nif (argv.help) {\n  showHelp()\n  argv.__warn?.()\n  process.exit(0)\n}\n\nimport { log, warn, dot } from '../utils/logger.js'\nimport { green } from 'kolorist'\n\nif (argv._.length !== 0 && argv._.length !== 2) {\n  console.log()\n  warn(`Wrong number of parameters (${argv._.length}).`)\n  showHelp()\n  process.exit(1)\n}\n\nconst { getCtx } = await import('../utils/get-ctx.js')\nconst { appExt } = getCtx({\n  mode: 'spa',\n  debug: false,\n  prod: true\n})\n\nif (argv._.length === 0) {\n  if (appExt.extensionList.length === 0) {\n    log(' No App Extensions are installed')\n    log(' You can look for \"quasar-app-extension-*\" in npm registry.')\n  } else {\n    console.log('Installed App Extensions:')\n","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/quasarframework/quasar/blob/4841521b5f635a971eb9e2710e5542efd194691b/app-vite/lib/cmd/ext.js#L31-L67","documentation":"The 'quasar ext' CLI accepts either no parameters (list extensions) or exactly two (an action and an extension name). Any other parameter count prints this warning, shows help, and exits with code 1. It is a usage guard, not a runtime failure.","triggerScenarios":"Running 'quasar ext' with 1 parameter (e.g. 'quasar ext add'), or 3+ parameters (e.g. 'quasar ext add my-ext extra').","commonSituations":"Forgetting the extension name after the action ('quasar ext invoke'), pasting extra args from docs, or scripting the CLI with the wrong arity.","solutions":["Supply exactly two parameters: 'quasar ext <add|remove|invoke|uninvoke> <ext-name>'.","Run 'quasar ext' with no arguments to list installed extensions.","Run 'quasar ext --help' to see accepted usage."],"exampleFix":"// before\nquasar ext add\n// after\nquasar ext add @quasar/icon-genie","handlingStrategy":"validation","validationCode":"// validate arity before invoking the CLI\nconst args = ['ext', 'add', '@quasar/qmarkdown'];\nconst rest = args.slice(1);\nif (rest.length !== 0 && rest.length !== 2) {\n  throw new Error('quasar ext takes 0 or 2 params: [<action> <extName>]');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Remember the contract: 'quasar ext' (list) or 'quasar ext <action> <name>'.","Check exit code 1 + help output in scripts to catch usage mistakes.","Consult 'quasar ext --help' rather than docs from memory."],"tags":["cli","usage","arguments","app-extension"],"backgroundTag":"invalid-cli-arguments","analyzedSha":"4841521b5f635a971eb9e2710e5542efd194691b","analyzedAt":"2026-08-30T01:13:14.944Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}