affaan-m/ECC · error · Error
Unknown argument: ${arg}
Error message
Unknown argument: ${arg} What it means
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.
Source
Thrown at scripts/lib/install/request.js:78
if (componentId.trim()) {
parsed.excludeComponentIds.push(componentId.trim());
}
index += 1;
} else if (arg === '--locale') {
const locale = args[index + 1] || '';
if (!locale || locale.startsWith('--')) {
throw new Error('Missing value for --locale');
}
parsed.locale = locale;
index += 1;
} else if (arg === '--dry-run') {
parsed.dryRun = true;
} else if (arg === '--json') {
parsed.json = true;
} else if (arg === '--help' || arg === '-h') {
parsed.help = true;
} else if (arg.startsWith('--')) {
throw new Error(`Unknown argument: ${arg}`);
} else {
parsed.languages.push(arg);
}
}
return parsed;
}
function normalizeInstallRequest(options = {}) {
const config = options.config && typeof options.config === 'object'
? options.config
: null;
const profileId = options.profileId || config?.profileId || null;
const target = options.target || config?.target || 'claude';
const moduleIds = validateInstallModuleIds(
dedupeStrings([...(config?.moduleIds || []), ...(options.moduleIds || [])])
);
const locale = options.locale || config?.locale || null;View on GitHub (pinned to 01e15490f0)
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.
Example fix
# before npx ecc install --lang python # after npx ecc install python
Defensive patterns
Strategy: validation
Validate before calling
const KNOWN_FLAGS = new Set(['--target','--config','--profile','--modules','--with','--skill','--skills','--without','--locale','--dry-run','--json','--help','-h']);
function findUnknownFlags(argv) {
return argv.slice(2).filter(a => a.startsWith('--') && !KNOWN_FLAGS.has(a));
} Try / catch
try {
const parsed = parseInstallArgs(argv);
} catch (e) {
if (/^Unknown argument: /.test(e.message)) {
console.error(`${e.message}\nRun 'ecc install --help' for the accepted flags.`);
process.exit(2);
}
throw e;
} Prevention
- 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.
When it happens
Trigger: Passing an unsupported flag like `--force`, `--global`, `--lang`, or a typo such as `--withh` or `--modoules`.
Common situations: Using flags from an older/newer ECC version; assuming an unimplemented option exists; copy-pasting flags from a different tool.
Related errors
- Missing value for --locale
- Legacy language arguments cannot be combined with --profile,
- No install profile, module IDs, included components, or lega
- Invalid ${name} value: expected a path
- Invalid --port value: ${portValue}
AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13).
Data as JSON: /api/errors/a6090444f8066fa6.
Report an issue: GitHub.