question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unhandled 'error' event

See original GitHub issue

Hi

The CI server(TeamCity) that I am using is behind a proxy. When I run %lhci% collect --url="https://xxx/"
I got the below error message:

Running Lighthouse 3 time(s) on https://xxx/
  events.js:292
        throw er; // Unhandled 'error' event
        ^
  Error: spawn node ENOENT
      at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
      at onErrorNT (internal/child_process.js:469:16)
      at processTicksAndRejections (internal/process/task_queues.js:84:21)
  Emitted 'error' event on ChildProcess instance at:
      at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
      at onErrorNT (internal/child_process.js:469:16)
      at processTicksAndRejections (internal/process/task_queues.js:84:21) {
    errno: 'ENOENT',
    code: 'ENOENT',
    syscall: 'spawn node',
    path: 'node',
    spawnargs: [
      'D:\\storage\\TOOLs\\Node\\12.18.2\\node_modules\\@lhci\\cli\\node_modules\\lighthouse\\lighthouse-cli\\index.js',
      'https://staging-web.ccleaner.com/',
      '--output',
      'json',
      '--output-path',
      'stdout',
      '--cli-flags-path',
      'D:\\work\\d861189cd355c9e2\\.lighthouseci\\flags-33da5e9f-3beb-41da-86c0-a859580f8d85.json'
    ]
  }

I also have environment variables for proxy: HTTP_PROXY, HTTP_PROXY_HOST and HTTP_PROXY_PORT Any idea what the error really is about?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13

github_iconTop GitHub Comments

2reactions
LiangChen0323commented, May 11, 2021

Hah, we figured it out. We added chrome-flags: "--proxy-server=xxxx" to .lighthouserc.yaml

0reactions
patrickhulcecommented, May 11, 2021

Great! Glad you got it working 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix "throw er; // Unhandled 'error' event"?
It's only affecting watch -command and appears to be linked to a file-system incompatibility when watching file changes. The line number ...
Read more >
Node.js unhandled 'error' event - Stack Overflow
A different process is already running in the same port. Either kill the running process or change the port number in the current...
Read more >
How to Fix “throw er; // Unhandled 'error' event”? - Medium
Execute above command to kill all current processes and see if it will work or not. Try to install above npm package. It...
Read more >
Node:events:491 throw er; // Unhandled 'error' event
Hello, i need help for this error.
Read more >
node:events:505 throw er; / unhandled 'error' event ^ error
Clean and correct solution: Technically, in node, whenever you emit an 'error' event and no one listens to it, it will throw. To...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found