stablyai/orca · error · Error
--output requires a path
Error message
--output requires a path
What it means
Thrown by readRequiredValue when --output is followed by a null or flag-like token. --output controls the markdown output file path and, when present, must take a value (compare-benchmark-artifacts.mjs:32-34, 64-69).
Source
Thrown at config/scripts/compare-benchmark-artifacts.mjs:67
}
continue
}
throw new Error(USAGE)
}
if (!parsed.baselinePath) {
throw new Error(USAGE)
}
if (!parsed.candidatePath) {
throw new Error(USAGE)
}
return parsed
}
function readRequiredValue(args, index, message) {
const value = args[index]
if (value == null || value.startsWith('--')) {
throw new Error(message)
}
return value
}
export function readBenchmarkArtifact(path) {
return JSON.parse(readFileSync(path, 'utf8'))
}
export function normalizeBenchmarkArtifact(path, artifact = readBenchmarkArtifact(path)) {
if (artifact?.summaryMedianMs != null) {
return normalizeNumericObject(path, artifact, 'startup', artifact.summaryMedianMs, () => 'ms')
}
if (artifact?.summaryMedian != null) {
return normalizeNumericObject(path, artifact, 'daemon', artifact.summaryMedian, (key) =>
key.endsWith('Count') || key.endsWith('After') ? 'count' : 'ms'
)
}
if (artifact?.suites != null) {View on GitHub (pinned to 1136503c6a)
Solutions
- Provide a writable file path token after --output, or remove the flag to print markdown to stdout only.
- Ensure the output directory is writable; the script does mkdirSync(dirname(...), {recursive:true}) but the path itself must be a valid string.
Example fix
// before
runBenchmarkComparisonCli({ argv: ['--baseline','b.json','--candidate','c.json','--output'] })
// after
runBenchmarkComparisonCli({ argv: ['--baseline','b.json','--candidate','c.json','--output','reports/cmp.md'] }) Defensive patterns
Strategy: validation
Validate before calling
const i = argv.indexOf('--output')
if (i !== -1 && (i + 1 >= argv.length || argv[i + 1].startsWith('--'))) {
throw new Error('--output needs a path')
} Prevention
- Compute the output directory in CI and fail the job early if unset.
- Omit --output entirely to write markdown to stdout when no file is needed.
When it happens
Trigger: Passing '--output' last; passing '--output --json-output j.json'; an empty shell variable for the output path.
Common situations: CI step that computes an output dir but the variable is unset on some runners; misordered optional flags; trailing flag after a copy-paste trim.
Related errors
- --baseline requires a path
- --candidate requires a path
- --title requires a value
- --json-output requires a path
- ${arg} requires a path
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/e959eb573bb81638.
Report an issue: GitHub.