stablyai/orca · error · Error
${arg} requires a path
Error message
${arg} requires a path What it means
Thrown by parseHtmlReportArgs when --output (or -o) is followed by a token that is missing or starts with '-', meaning no output path was supplied. The output path defaults to test-results/terminal-perf-impact-report.html or the ORCA_E2E_TERMINAL_PERF_HTML_REPORT_PATH env var, so --output is only needed to override it (generate-terminal-perf-html-report.mjs:60-64).
Source
Thrown at config/scripts/generate-terminal-perf-html-report.mjs:63
revisitMs: '#0d9488'
}
const LABELED_INPUT_RE = /^([\w .#@()+-]+)=(.+)$/
export function parseHtmlReportArgs(argv, env = process.env) {
const args = [...argv]
if (args[0] === '--') {
args.shift()
}
const inputs = []
let outputPath = env.ORCA_E2E_TERMINAL_PERF_HTML_REPORT_PATH || DEFAULT_OUTPUT_PATH
for (let index = 0; index < args.length; index += 1) {
const arg = args[index]
if (arg === '--output' || arg === '-o') {
const next = args[index + 1]
if (!next || next.startsWith('-')) {
throw new Error(`${arg} requires a path`)
}
outputPath = next
index += 1
continue
}
if (arg.startsWith('--output=')) {
outputPath = arg.slice('--output='.length)
continue
}
const labeled = arg.match(LABELED_INPUT_RE)
if (labeled) {
inputs.push({ label: labeled[1], path: labeled[2] })
} else {
inputs.push({ label: basename(arg).replace(/\.json$/i, ''), path: arg })
}
}
if (inputs.length === 0) {View on GitHub (pinned to 1136503c6a)
Solutions
- Provide a non-dash-prefixed file path token after --output/-o.
- Or remove --output to use the default path or the ORCA_E2E_TERMINAL_PERF_HTML_REPORT_PATH env var.
- Guard shell variables: --output "${REPORT_PATH:?missing}".
Example fix
// before parseHtmlReportArgs(['--output']) // after parseHtmlReportArgs(['report.html', '--output', 'out/perf.html'])
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 requires a path')
} Prevention
- Omit --output to use the default path when no override is needed.
- Guard shell path variables with ${VAR:?missing}.
When it happens
Trigger: Passing '--output' as the last token; passing '--output -v' or '--output --foo'; a shell variable for the path expanding to empty.
Common situations: A CI step computing a report dir that is unset on some matrix legs; misordered flags where a path-like flag is actually another option; trailing --output after trimming a command.
Related errors
- --baseline requires a path
- --candidate requires a path
- --title requires a value
- --output requires a path
- --json-output requires a path
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/efe92049efbd4c97.
Report an issue: GitHub.