treosh / lighthouse-ci-action

Audit URLs using Lighthouse and test performance with Lighthouse CI.
MIT License
1.18k stars 82 forks source link

Recipe for using with a lighthouse plugin results in an error #108

Closed Roshanjossey closed 4 months ago

Roshanjossey commented 2 years ago

I'm following the recipe in the Readme for Use with a Lighthouse plugin.

This results in the following error

  Running Lighthouse 1 time(s) on https://firstcontributions.github.io
  Run #1...failed!
  SyntaxError: Unexpected token e in JSON at position 0
      at JSON.parse (<anonymous>)
      at saveLHR (/home/runner/work/_actions/treosh/lighthouse-ci-action/v9/node_modules/@lhci/utils/src/saved-reports.js:46:65)
      at runOnUrl (/home/runner/work/_actions/treosh/lighthouse-ci-action/v9/node_modules/@lhci/cli/src/collect/collect.js:128:7)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at async Object.runCommand (/home/runner/work/_actions/treosh/lighthouse-ci-action/v9/node_modules/@lhci/cli/src/collect/collect.js:245:7)
  Error: LHCI 'collect' has encountered a problem.
      at async run (/home/runner/work/_actions/treosh/lighthouse-ci-action/v9/node_modules/@lhci/cli/src/cli.js:103:7)

You can find my changes in https://github.com/firstcontributions/merge-bot/pull/18/files And logs for the failing build in https://github.com/firstcontributions/merge-bot/actions/runs/3078368494/jobs/4973877805