{"record":{"id":"a6090444f8066fa6","repo":"affaan-m/ECC","slug":"unknown-argument-arg-a60904","errorCode":null,"errorMessage":"Unknown argument: ${arg}","messagePattern":"Unknown argument: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/lib/install/request.js","lineNumber":78,"sourceCode":"      if (componentId.trim()) {\n        parsed.excludeComponentIds.push(componentId.trim());\n      }\n      index += 1;\n    } else if (arg === '--locale') {\n      const locale = args[index + 1] || '';\n      if (!locale || locale.startsWith('--')) {\n        throw new Error('Missing value for --locale');\n      }\n      parsed.locale = locale;\n      index += 1;\n    } else if (arg === '--dry-run') {\n      parsed.dryRun = true;\n    } else if (arg === '--json') {\n      parsed.json = true;\n    } else if (arg === '--help' || arg === '-h') {\n      parsed.help = true;\n    } else if (arg.startsWith('--')) {\n      throw new Error(`Unknown argument: ${arg}`);\n    } else {\n      parsed.languages.push(arg);\n    }\n  }\n\n  return parsed;\n}\n\nfunction normalizeInstallRequest(options = {}) {\n  const config = options.config && typeof options.config === 'object'\n    ? options.config\n    : null;\n  const profileId = options.profileId || config?.profileId || null;\n  const target = options.target || config?.target || 'claude';\n  const moduleIds = validateInstallModuleIds(\n    dedupeStrings([...(config?.moduleIds || []), ...(options.moduleIds || [])])\n  );\n  const locale = options.locale || config?.locale || null;","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/lib/install/request.js#L60-L96","documentation":"Thrown by parseInstallArgs() when it encounters a token beginning with -- that does not match any recognized flag (--target, --config, --profile, --modules, --with, --skill(s), --without, --locale, --dry-run, --json, --help/-h). It is a hard stop against silently swallowing typo'd flags.","triggerScenarios":"Passing an unsupported flag like `--force`, `--global`, `--lang`, or a typo such as `--withh` or `--modoules`.","commonSituations":"Using flags from an older/newer ECC version; assuming an unimplemented option exists; copy-pasting flags from a different tool.","solutions":["Run with --help to list the accepted flags for your ECC version.","Correct the typo or remove the unsupported flag.","If you expected the flag to exist, upgrade ECC or open a feature request."],"exampleFix":"# before\nnpx ecc install --lang python\n# after\nnpx ecc install python","handlingStrategy":"validation","validationCode":"const KNOWN_FLAGS = new Set(['--target','--config','--profile','--modules','--with','--skill','--skills','--without','--locale','--dry-run','--json','--help','-h']);\nfunction findUnknownFlags(argv) {\n  return argv.slice(2).filter(a => a.startsWith('--') && !KNOWN_FLAGS.has(a));\n}","typeGuard":null,"tryCatchPattern":"try {\n  const parsed = parseInstallArgs(argv);\n} catch (e) {\n  if (/^Unknown argument: /.test(e.message)) {\n    console.error(`${e.message}\\nRun 'ecc install --help' for the accepted flags.`);\n    process.exit(2);\n  }\n  throw e;\n}","preventionTips":["Surface --help text alongside the error so users can discover the accepted set.","When wrapping the CLI, lint the flag list against KNOWN_FLAGS before invoking.","Keep a single source of truth for flag names so docs and parser stay in sync."],"tags":["cli","arguments","install"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}