I have chrome, LTS version of Node, and lighthouse already installed but get the following error when I try to run an audit:
/usr/local/lib/node_modules/lighthouse/lighthouse-core/lib/url-shim.js:36
class URLShim extends URL {
^
ReferenceError: URL is not defined
at Object.<anonymous> (/usr/local/lib/node_modules/lighthouse/lighthouse-core/lib/url-shim.js:36:23)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/local/lib/node_modules/lighthouse/lighthouse-core/lib/network-request.js:14:13)
at Module._compile (module.js:652:30)
After installing all that is required, I try to test it and get the above error.
lighthouse https://www.bbc.co.uk
As I understand it you type lighthouse on the command line followed by the url of the site you're trying to run an audit against. But I keep getting :
ReferenceError: URL is not defined.
Am I doing something wrong. PLEASE HELP.