treosh / lighthouse-ci-action

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

error when run lighthouse on (custom) GitHub runner (with preinstalled Chrome) #91

Closed Kobe closed 2 years ago

Kobe commented 2 years ago

Hi,

we would like to run Lighthouse on pre-PRO environment which is only available internally. That's why we have a custom GitHub runner running on on-premise Kubernetes. Google Chrome browser is already installed.

But it fails with the following error. Maybe someone has a clue what went wrong.

events.js:187
  Running Lighthouse 10 time(s) on https://www.mypage.de/
        throw er; // Unhandled 'error' event
        ^

  Error: spawn node ENOENT
      at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
      at onErrorNT (internal/child_process.js:456:16)
      at processTicksAndRejections (internal/process/task_queues.js:80:21)
  Emitted 'error' event on ChildProcess instance at:
      at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
      at onErrorNT (internal/child_process.js:456:16)
      at processTicksAndRejections (internal/process/task_queues.js:80:21) {
    errno: 'ENOENT',
    code: 'ENOENT',
    syscall: 'spawn node',
    path: 'node',
    spawnargs: [
      '/runner/_work/_actions/treosh/lighthouse-ci-action/v8/node_modules/lighthouse/lighthouse-cli/index.js',
      'https://www.mypage.de/',
      '--output',
      'json',
      '--output-path',
      'stdout',
      '--cli-flags-path',
      '/runner/_work/mypage-ui/mypage-ui/.lighthouseci/flags-30755ad7-427c-4a5d-87fb-b48693f0278e.json'
    ]
  }
  Run #1...::error::LHCI 'collect' has encountered a problem.
Kobe commented 2 years ago

FYI: I set up a PR to update the README with the missing information about requirement "install chrome + node.js"