ReactiveX/rxjs · error · Error

Unknown option: ${String(argument)}

Error message

Unknown option: ${String(argument)}

What it means

Thrown by parseSkillArguments when a token other than the recognized flags (--harness, --project-root, --force) is encountered. The CLI has no pass-through options, so any extra token is rejected.

Source

Thrown at packages/migrate/src/skill-cli.ts:93

    );
  }
  let harness: SkillHarness | undefined;
  let projectRoot = process.cwd();
  let force = false;
  for (let index = 1; index < argv.length; index++) {
    const argument = argv[index];
    if (argument === '--harness') {
      const value = argv[++index];
      if (!value || !skillHarnesses.includes(value as SkillHarness)) throw new Error('--harness requires codex, claude, or cursor');
      harness = value as SkillHarness;
    } else if (argument === '--project-root') {
      const value = argv[++index];
      if (!value) throw new Error('--project-root requires a directory');
      projectRoot = value;
    } else if (argument === '--force') {
      force = true;
    } else {
      throw new Error(`Unknown option: ${String(argument)}`);
    }
  }
  if (!harness) throw new Error('--harness is required');
  return { action, harness, projectRoot, force };
}

function writeJson(stream: Pick<NodeJS.WriteStream, 'write'>, value: unknown): void {
  stream.write(`${JSON.stringify(value, null, 2)}\n`);
}

function messageFor(error: unknown): string {
  return error instanceof Error ? error.message : String(error);
}

if (process.argv[1]?.replaceAll('\\', '/').endsWith('/skill-cli.js')) {
  runSkillCli(process.argv.slice(2)).then((status) => {
    process.exitCode = status;
  });

View on GitHub (pinned to 54796b38a5)

Solutions

  1. Remove the unsupported option
  2. Consult the usage string for the exact accepted flags
  3. Use only: --harness <id>, --project-root <dir>, --force

Example fix

# before
rxjs-migrate-skill check --harness claude --dry-run
# after
rxjs-migrate-skill check --harness claude
Defensive patterns

Strategy: validation

Validate before calling

const allowed = new Set(['--harness','--project-root','--force']);
for (const a of argv.slice(1)) if (a.startsWith('--') && !allowed.has(a)) throw new TypeError(`Unknown option: ${a}`);

Type guard

const isKnownFlag = (f: string) => ['--harness','--project-root','--force'].includes(f);

Prevention

When it happens

Trigger: Passing unsupported flags like --verbose or --dry-run, or a stray positional argument after the action.

Common situations: Assuming common CLI flags exist; copy-pasted options from other tools; shell glob expansion injecting extra tokens.

Related errors


AI-assisted analysis of ReactiveX/rxjs@54796b38a5 (2026-08-28). Data as JSON: /api/errors/64766f7c17ddb16e. Report an issue: GitHub.