santifer/career-ops · error · Error
unknown option: ${arg}
Error message
unknown option: ${arg} What it means
Error "unknown option: ${arg}" thrown in santifer/career-ops.
Source
Thrown at company-funded.mjs:120
months: DEFAULT_MONTHS,
sort: DEFAULT_SORT,
sources: [...DEFAULT_SOURCES],
dryRun: false,
json: false,
selfTest: false,
help: false,
};
for (let i = 0; i < argv.length; i++) {
const arg = argv[i];
if (arg === '--dry-run') opts.dryRun = true;
else if (arg === '--json') opts.json = true;
else if (arg === '--self-test') opts.selfTest = true;
else if (arg === '--help' || arg === '-h') opts.help = true;
else if (arg === '--limit') opts.limit = Number(argv[++i] || '');
else if (arg === '--months') opts.months = Number(argv[++i] || '');
else if (arg === '--sort') opts.sort = String(argv[++i] || '').trim().toLowerCase();
else if (arg === '--sources') opts.sources = parseSources(argv[++i] || '');
else throw new Error(`unknown option: ${arg}`);
}
if (!Number.isInteger(opts.limit) || opts.limit <= 0 || opts.limit > 100) {
throw new Error('--limit must be an integer from 1 to 100');
}
if (!Number.isInteger(opts.months) || opts.months <= 0 || opts.months > 120) {
throw new Error('--months must be an integer from 1 to 120');
}
if (!['date', 'score'].includes(opts.sort)) {
throw new Error('--sort must be date or score');
}
return opts;
}
function parseSources(value) {
const out = String(value || '')
.split(',')
.map((s) => normalizeSourceName(s.trim()))
.filter(Boolean);View on GitHub (pinned to 9b17a8ac97)
Solutions
- Run with a supported option only — check --help for the valid flags.
- Remove or correct the misspelled option.
Example fix
node company-funded.mjs --limit 20 --sort score
When it happens
Trigger: Thrown at company-funded.mjs:120 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of santifer/career-ops@9b17a8ac97 (2026-08-13).
Data as JSON: /api/errors/cc6341d6ceec7b3f.
Report an issue: GitHub.