{"record":{"id":"214cce338bbefdb1","repo":"stablyai/orca","slug":"usage-node-config-scripts-generate-terminal-perf","errorCode":null,"errorMessage":"Usage: node config/scripts/generate-terminal-perf-html-report.mjs [label=]<playwright-json>... --output <report.html>","messagePattern":"Usage: node config/scripts/generate-terminal-perf-html-report\\.mjs \\[label=\\]<playwright-json>\\.\\.\\. --output <report\\.html>","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"config/scripts/generate-terminal-perf-html-report.mjs","lineNumber":82,"sourceCode":"      }\n      outputPath = next\n      index += 1\n      continue\n    }\n    if (arg.startsWith('--output=')) {\n      outputPath = arg.slice('--output='.length)\n      continue\n    }\n    const labeled = arg.match(LABELED_INPUT_RE)\n    if (labeled) {\n      inputs.push({ label: labeled[1], path: labeled[2] })\n    } else {\n      inputs.push({ label: basename(arg).replace(/\\.json$/i, ''), path: arg })\n    }\n  }\n\n  if (inputs.length === 0) {\n    throw new Error(\n      'Usage: node config/scripts/generate-terminal-perf-html-report.mjs [label=]<playwright-json>... --output <report.html>'\n    )\n  }\n  return { inputs, outputPath }\n}\n\n// ── Trend data ────────────────────────────────────────────────────────────\n\nfunction buildMatrix(revisions) {\n  const scenarios = new Map()\n  for (const revision of revisions) {\n    for (const row of revision.rows) {\n      if (!scenarios.has(row.scenario)) {\n        scenarios.set(row.scenario, new Map())\n      }\n      scenarios.get(row.scenario).set(revision.label, row)\n    }\n  }","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/config/scripts/generate-terminal-perf-html-report.mjs#L64-L100","documentation":"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).","triggerScenarios":"Running the script with no arguments; passing only --output and no positional inputs; passing only flags that the parser does not recognize as inputs.","commonSituations":"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.","solutions":["Pass at least one Playwright JSON report path, optionally with a label: baseline=old.json new.json.","Ensure the glob/expansion producing input paths matched at least one file before invoking.","Confirm the Playwright terminal-perf run completed and wrote its JSON report."],"exampleFix":"# before\nnode config/scripts/generate-terminal-perf-html-report.mjs --output r.html\n# after\nnode config/scripts/generate-terminal-perf-html-report.mjs v1=old.json v2=new.json --output r.html","handlingStrategy":"validation","validationCode":"const positional = argv.filter(a => !a.startsWith('-') || /\\=/.test(a))\nif (positional.length === 0) {\n  throw new Error('Provide at least one Playwright JSON report path')\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Ensure the Playwright terminal-perf run produced at least one JSON report before invoking the generator.","Use a glob and assert it matched >= 1 file before building argv."],"tags":["cli","argument-validation","benchmark"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}