GoogleChrome / GoogleChrome/lighthouse
'no such file or directory' error if output path does not exist
- Dominant language
- JavaScript
- Stars
- 30.8k
- Forks
- 9.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 20
Description
### FAQ
- [X] Yes, my issue is not about [variability](https://github.com/GoogleChrome/lighthouse/blob/master/docs/variability.md) or [throttling](https://github.com/GoogleChrome/lighthouse/blob/master/docs/throttling.md).
- [X] Yes, my issue is not about a specific accessibility audit (file with [axe-core](https://github.com/dequelabs/axe-core) instead).
### URL
http://localhost:8080
### What happened?
Running the following command `lighthouse http://localhost:8080 --output=json,html --output-path=./reports/lighthouse --chrome-flags='--headless'` end up with an `ENOENT` error if the `reports` folder does not exist prior to running the script.
### What did you expect?
Since the reports folder is added to the .gitignore and does not exist in the repo, lighthouse should create the folder during the reports generation
### What have you tried?
Manually creating the `reports` folder before running the script solves the issue
### How were you running Lighthouse?
CLI
### Lighthouse Version
9.6.1
### Chrome Version
104.0.5094.0
### Node Version
16.15.0
### OS
Windows 11
### Relevant log output
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.