Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI fails with spawn unknown error on Windows #67

Closed
rhianvanesch opened this issue Nov 12, 2019 · 2 comments
Closed

CLI fails with spawn unknown error on Windows #67

rhianvanesch opened this issue Nov 12, 2019 · 2 comments
Labels
bug Something isn't working P1

Comments

@rhianvanesch
Copy link

Firstly: this is a great project and I'm really excited to use it. Thanks for all the hard work!

In https://github.com/GoogleChrome/lighthouse-ci/blob/master/docs/cli.md#overview it says "Install the CLI globally to try it out locally", but on Windows the run ends with an spawn UNKNOWN error:

✅  .lighthouseci/ directory writable
⚠️   Configuration file found
Healthcheck passed!

Automatically determined ./dist as `staticDistDir`.
Set it explicitly in lighthouserc.json if incorrect.

Started a web server on port 6146...
Running Lighthouse 3 time(s) on http://localhost:6146/404.html
Run #1...failed!
Error: spawn UNKNOWN
    at ChildProcess.spawn (internal/child_process.js:394:11)
    at Object.spawn (child_process.js:540:9)
    at LighthouseRunner.run (C:\Users\Rhian\AppData\Roaming\npm\node_modules\@lhci\cli\src\collect\lighthouse-runner.js:83:34)

This looks to be because childProcess.spawn() in lighthouse-runner.js is called without a third argument { shell: true }, which is required on Windows.

Since this is a CI tool and was probably never intended to be run on Windows, perhaps the only change needed is to mention this in the CLI documentation that I linked above. It would be useful to be able to do dry runs locally, though.

@patrickhulce
Copy link
Collaborator

Thanks so much for filing @escherina!

Since this is a CI tool and was probably never intended to be run on Windows, perhaps the only change needed is to mention this in the CLI documentation that I linked above. It would be useful to be able to do dry runs locally, though.

Great point we didn't consider the dry run case, and I'm sure some folks will want to run on windows CI machines in the future, so I'm sold! 👍

@patrickhulce patrickhulce added the bug Something isn't working label Nov 12, 2019
@patrickhulce
Copy link
Collaborator

should be fixed by #79 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1
Projects
None yet
Development

No branches or pull requests

2 participants