stablyai/orca · error · Error
Missing value for ${arg}
Error message
Missing value for ${arg} What it means
Thrown by parseArgs when a known flag (--boundary, --trials, or --output) is the last token on the command line with no following value. The parser reads argv[index+1] as the value; if it is undefined/falsy the flag is dangling.
Source
Thrown at config/scripts/hang-watchdog-memory-benchmark.mjs:287
? await measureWorker(markerPath)
: (() => {
throw new Error(`Unsupported boundary: ${boundary}`)
})()
process.stdout.write(`${RESULT_PREFIX}${JSON.stringify(result)}\n`)
} finally {
app.quit()
rmSync(profileDir, { recursive: true, force: true })
}
}
function parseArgs(argv) {
const options = { boundary: '', trials: DEFAULT_TRIALS, output: '' }
for (let index = 0; index < argv.length; index += 1) {
const arg = argv[index]
const value = argv[index + 1]
if (arg === '--boundary' || arg === '--trials' || arg === '--output') {
if (!value) {
throw new Error(`Missing value for ${arg}`)
}
options[arg.slice(2)] = arg === '--trials' ? Number(value) : value
index += 1
} else {
throw new Error(`Unknown argument: ${arg}`)
}
}
if (!['child', 'worker'].includes(options.boundary)) {
throw new Error('--boundary must be child or worker')
}
if (!Number.isInteger(options.trials) || options.trials < 1) {
throw new Error('--trials must be a positive integer')
}
return options
}
function electronPath() {
const requirePath = import.meta.resolve('electron')View on GitHub (pinned to 1136503c6a)
Solutions
- Provide a value after each flag: `--boundary child`, `--trials 7`, `--output report.json`.
- Double-check CI scripts and shell aliases for truncated argument lists.
Example fix
// before node config/scripts/hang-watchdog-memory-benchmark.mjs --boundary // after node config/scripts/hang-watchdog-memory-benchmark.mjs --boundary child
Defensive patterns
Strategy: validation
Validate before calling
// Validate each flag has a value before consuming it
for (let i = 0; i < argv.length; i++) {
const a = argv[i]
if (a === '--boundary' || a === '--trials' || a === '--output') {
if (i + 1 >= argv.length || !argv[i + 1]) throw new Error(`Missing value for ${a}`)
}
} Prevention
- Always pair a flag with its value in CI workflow definitions.
- Use a dedicated arg parser (e.g. commander/yargs) if the CLI grows beyond three flags.
When it happens
Trigger: Invoking the benchmark with a trailing flag and no argument, e.g. `--boundary` at end of argv, or `--output` with nothing after it.
Common situations: Typos in CI workflow YAML, a truncated copy-pasted command, or shell quoting that swallowed the value.
Related errors
- Unknown argument: ${arg}
- --boundary must be child or worker
- --trials must be a positive integer
- Missing value for ${arg}
- Unknown argument: ${arg}
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/073c13f94d67c200.
Report an issue: GitHub.