How to run desktop mode from node? #12058
-
Hi! I'm using node module of LH in my app and I'm struggling to force LH to execute desktop audit. In LH execution module I've imported desktop config as I also additionally append chrome port and output format into options object
My runtime options which are passed to LH are
Current behaviourAudit is done against mobile device. even though options for desktop device are specified. Expected behaviourAudit to be done against desktop device with the setting passed in options EnvironmentNode.js: 12.18.1 Is there something I'm terribly missing? I tend to think so as Chrome DevTools uses LH as well and when doing audit manually for desktop, it works correctly. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Lighthouse options passed in node are not the same thing as the config :) The signature of Lighthouse 7 is |
Beta Was this translation helpful? Give feedback.
Lighthouse options passed in node are not the same thing as the config :)
The signature of Lighthouse 7 is
lighthouse(url, flags, config)
. If you pass the config as the third argument and your extra options as the as the second, I would expect everything to work as expected.