-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
ReferenceError: URL is not defined #8909
Comments
I was facing the same problem but I found out that the latest version of this package requires Node 10 or above. Relevant links: |
@cristianoliveira thanks, I didn't notice that |
@evromalarkey You can try the previous version of lighthouse as -> npm install -g lighthouse@4.0.0 --save-exact |
Updating / Switching to any node version above |
Add this line at the top of script solved my issue |
@bitrecipe while that might work right now, the only officially supposed node version moving forward is v10 LTS, so just be aware that future Lighthouse versions might end up breaking you unexpectedly if you're still on v8. |
@patrickhulce I know this is a shortcut method not the correct approach but it's works on Node.js version 8, if he still need Node.js version 8 for some reason |
I am getting the same error.
I added the command in a bash script. When I run the bash script, everything works well. |
I'm guessing the node version used by the cron job is falling back to an older system version than the one used by you in a bash script. Check |
That is absolutely correct! From my terminal
but from cron it's
Any suggestions? |
I did something which I don't know if it was a good idea. I don't know how I could have removed or upgraded the
and my command worked from the cron job. |
Getting this error in my CI after updating to version 5.0.0, I think it has to do something with 94800e1
Provide the steps to reproduce
lighthouse --chrome-flags="--disable-gpu --headless --no-sandbox" https://google.com --output json --output html --output-path ./.lighthouse/google.com_05-09-19-1557389996769.json
Environment Information
The text was updated successfully, but these errors were encountered: