stablyai/orca · error · Error

${arg} requires a path

Error message

${arg} requires a path

What it means

The gate script parses forwarded args to find --report/--report-path/--output and capture the JSON report path. Each of these expects a following path token; if the next arg is missing or starts with '-' (another flag), it throws. This prevents silently writing the report to an unintended/default location or to a flag-named file.

Source

Thrown at config/scripts/run-terminal-scale-perf-report-gate.mjs:22

import { dirname, join } from 'node:path'

const DEFAULT_REPORT_PATH = 'test-results/terminal-scale-perf-report.json'
const DEFAULT_HTML_REPORT_PATH = 'test-results/terminal-perf-impact-report.html'

export function parseReportGateArgs(argv, env = process.env) {
  const forwardedArgs = [...argv]
  if (forwardedArgs[0] === '--') {
    forwardedArgs.shift()
  }

  let reportPath = env.ORCA_E2E_TERMINAL_PERF_REPORT_PATH || DEFAULT_REPORT_PATH
  const passthroughArgs = []
  for (let index = 0; index < forwardedArgs.length; index += 1) {
    const arg = forwardedArgs[index]
    if (arg === '--report' || arg === '--report-path' || arg === '--output') {
      const next = forwardedArgs[index + 1]
      if (!next || next.startsWith('-')) {
        throw new Error(`${arg} requires a path`)
      }
      reportPath = next
      index += 1
      continue
    }
    if (
      arg.startsWith('--report=') ||
      arg.startsWith('--report-path=') ||
      arg.startsWith('--output=')
    ) {
      reportPath = arg.slice(arg.indexOf('=') + 1)
      continue
    }
    if (arg === '--reporter' || arg.startsWith('--reporter=')) {
      throw new Error('test:e2e:terminal-perf:scale:report always uses --reporter=json')
    }
    passthroughArgs.push(arg)
  }

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Supply an explicit path: --report ./test-results/perf-report.json.
  2. If you wanted the default location, omit --report entirely (env ORCA_E2E_TERMINAL_PERF_REPORT_PATH or DEFAULT_REPORT_PATH applies).
  3. Quote paths containing spaces and ensure the path does not start with '-' (rename or use an absolute path).

Example fix

// before
pnpm run test:e2e:terminal-perf:scale:report -- --report
// after
pnpm run test:e2e:terminal-perf:scale:report -- --report ./test-results/perf-report.json
Defensive patterns

Strategy: validation

Validate before calling

for (let i = 0; i < args.length; i++) {
  const a = args[i]
  if (a === '--report' || a === '--report-path' || a === '--output') {
    const next = args[i + 1]
    if (!next || next.startsWith('-')) {
      console.error(`${a} requires a path argument`); process.exit(2)
    }
  }
}

Prevention

When it happens

Trigger: Passing `--report` as the last arg, or `--report --something`, so the parser sees no path value where one is required.

Common situations: A developer appends --report without a value expecting a default; an arg-quoting bug collapses the path; copy-pasting a command and dropping the trailing path.

Related errors


AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12). Data as JSON: /api/errors/9b3d92d9e3defebc. Report an issue: GitHub.