Replies: 4 comments
-
I can confirm, pretty much the errors are same. In my case, I cannot use https://github.com/GoogleChromeLabs/bubblewrap in WSL2 because it needs to pass Lighthouse PWA checks. |
Beta Was this translation helpful? Give feedback.
-
the options passed to Lighthouse supports |
Beta Was this translation helpful? Give feedback.
-
I've tried specifying the hostname but that doesn't seem to take affect. |
Beta Was this translation helpful? Give feedback.
-
I was facing the same issue on WSL2 and resolved it by replacing First install the dependencies using import lighthouse from "lighthouse";
import puppeteer from "puppeteer";
(async () => {
try {
const browser = await puppeteer.launch({
args: ["--remote-debugging-port=9222"],
});
const options = {
logLevel: "info",
output: "html",
onlyCategories: ["performance"],
port: 9222,
};
const url = "https://creme332.github.io/";
const runnerResult = await lighthouse(url, options);
console.log(
"Performance score:",
runnerResult.lhr.categories.performance.score * 100
);
await browser.close();
} catch (err) {
console.error(err);
}
})(); Note: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to get lighthouse working on WSL2. I believe I have all the correct components installed. The issue I think is around the ip address of the WSL2 virtual machine. Is there a way to pass the local machine ip address?
Here is the setup I used and the code I ran.
update wsl ubuntu 20 compponents
sudo apt curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash nvm install --lts nvm list
Code I am trying to run
error message
Beta Was this translation helpful? Give feedback.
All reactions