Closed scottprugh closed 3 years ago
I got same error, then try following way. It is working well at my side.
lighthouse-batch -p "--emulated-form-factor desktop" –f site.txt -h
Thank you. That works. It's odd that this parameter doesn't match the lighthouse 7.0 parameters: calling lighthouse with --emulated-form-factor desktop fails with this. Error: Invalid emulation flag. Emulation configuration changed in LH 7.0. See https://github.com/GoogleChrome/lighthouse/blob/master/docs/emulation.md
Thank you. That works. It's odd that this parameter doesn't match the lighthouse 7.0 parameters: calling lighthouse with --emulated-form-factor desktop fails with this. Error: Invalid emulation flag. Emulation configuration changed in LH 7.0. See https://github.com/GoogleChrome/lighthouse/blob/master/docs/emulation.md
Felt same. there are also some parameters not supported, e.g. --output=csv
Ref.https://github.com/mikestead/lighthouse-batch/issues/55
Hey thanks all, will try and look at this soon. lighthouse-batch
is not currently targeting lighthouse v7 so that is probably the issue. https://github.com/mikestead/lighthouse-batch/blob/master/package.json#L21
Fixed in version 7.0.0
e.g. npx lighthouse-batch -s web.dev -h -p "--preset=desktop"
@ast-hao sorry to hear that. It seems to be working ok on my end, wondering if it could be a windows vs mac thing.
First request is to double check your global version installed lighthouse-batch --version
. This should be v7+.
After that if you could you add the -v
(verbose) option and let me know what params are printed out for the lighthouse command. e.g. for this command
npx lighthouse-batch -p "--preset=desktop" -s web.dev -h --csv -v
I see the following logged
Lighthouse batch run begin for 1 site
1/1: Lighthouse analyzing 'https://web.dev'
"https://web.dev" --output json --output html --output csv --output-path "report/lighthouse/web_dev" --chrome-flags="--no-sandbox --headless --disable-gpu" --preset=desktop
@ast-hao sorry to hear that. It seems to be working ok on my end, wondering if it could be a windows vs mac thing.
First request is to double check your global version installed
lighthouse-batch --version
. This should be v7+.After that if you could you add the
-v
(verbose) option and let me know what params are printed out for the lighthouse command. e.g. for this commandnpx lighthouse-batch -p "--preset=desktop" -s web.dev -h --csv -v
I see the following logged
Lighthouse batch run begin for 1 site 1/1: Lighthouse analyzing 'https://web.dev' "https://web.dev" --output json --output html --output csv --output-path "report/lighthouse/web_dev" --chrome-flags="--no-sandbox --headless --disable-gpu" --preset=desktop
Hi mikestead, I re-installed the latest lighthouse, at the end of the installation, it tells 2 packages updated, version 7.0.1, then the --preset=desktop in lighthouse-batch is working well now. Sorry I just see your reply, cannot test now... Thanks again for the batch tool!
no worries, good to hear
The following cmd line fails:
lighthouse-batch -f site.txt -h -p "--preset=desktop"
Invalid values: Argument: preset, Given: "desktop", Choices: "perf", "experimental"
But this lighthouse command line : lighthouse https://www.xxxx.com/ --output=json,html --preset=desktop
Is lighthouse-batch using a different version of the lighthouse library?
Succeeds. As such I am unable to run lighthouse-batch for desktop workloads.