stablyai/orca · error · Error

Usage: node config/scripts/generate-terminal-perf-html-repor

Error message

Usage: node config/scripts/generate-terminal-perf-html-report.mjs [label=]<playwright-json>... --output <report.html>

What it means

Thrown by parseHtmlReportArgs when no input Playwright JSON files were provided (inputs.length === 0). The script requires at least one positional (or label=path) input to build a trend report (generate-terminal-perf-html-report.mjs:81-85).

Source

Thrown at config/scripts/generate-terminal-perf-html-report.mjs:82

      }
      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) {
    throw new Error(
      'Usage: node config/scripts/generate-terminal-perf-html-report.mjs [label=]<playwright-json>... --output <report.html>'
    )
  }
  return { inputs, outputPath }
}

// ── Trend data ────────────────────────────────────────────────────────────

function buildMatrix(revisions) {
  const scenarios = new Map()
  for (const revision of revisions) {
    for (const row of revision.rows) {
      if (!scenarios.has(row.scenario)) {
        scenarios.set(row.scenario, new Map())
      }
      scenarios.get(row.scenario).set(revision.label, row)
    }
  }

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Pass at least one Playwright JSON report path, optionally with a label: baseline=old.json new.json.
  2. Ensure the glob/expansion producing input paths matched at least one file before invoking.
  3. Confirm the Playwright terminal-perf run completed and wrote its JSON report.

Example fix

# before
node config/scripts/generate-terminal-perf-html-report.mjs --output r.html
# after
node config/scripts/generate-terminal-perf-html-report.mjs v1=old.json v2=new.json --output r.html
Defensive patterns

Strategy: validation

Validate before calling

const positional = argv.filter(a => !a.startsWith('-') || /\=/.test(a))
if (positional.length === 0) {
  throw new Error('Provide at least one Playwright JSON report path')
}

Prevention

When it happens

Trigger: Running the script with no arguments; passing only --output and no positional inputs; passing only flags that the parser does not recognize as inputs.

Common situations: A CI gate that invokes the report generator before any Playwright perf run has produced JSON; a glob that expanded to zero files; misreading the usage and omitting the positional report path.

Related errors


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