GoogleChrome / lighthouse

Automated auditing, performance metrics, and best practices for the web.
https://developer.chrome.com/docs/lighthouse/overview/
Apache License 2.0
28.4k stars 9.39k forks source link

New lighthouse-logger 1.4.1 breaks Google Chrome Launcher 96.0.4664.45 on Node 10.18.1 #15088

Closed LadyBo closed 1 year ago

LadyBo commented 1 year ago

FAQ

URL

https://gitlab.x2sy.com/

What happened?

Lighthouse has been updated ~16 hours ago and the minor version was changed (https://www.npmjs.com/package/lighthouse-logger).

But this change causes problems on Node 10.18.1

.../node_modules/lighthouse-logger/index.js:7
import process from 'process';
       ^^^^^^^

SyntaxError: Unexpected identifier
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/home/jenkins/agent/workspace/SmartTV/STV QA/Monitoring_Full_pipeline_kube/node_modules/chrome-launcher/dist/chrome-finder.js:14:13)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
npm ERR! Test failed.  See above for more details.

It is specified as ^1.0.0 in chrome-launcher dependencies.

Considering that there was such a global change in the structure of the project, shouldn't this be reflected in the major version of the tool, and not in the minor one?

What did you expect?

It would be really helpful to make this update as the Major version change and leave the last supported version 1.3.0 as it was before

What have you tried?

No response

How were you running Lighthouse?

node

Lighthouse Version

1.4.1, 1.3.0

Chrome Version

96.0.4664.45

Node Version

10.18.1

OS

No response

Relevant log output

No response

adamraine commented 1 year ago

The breakage was created in 1.4.0 and fixed in 1.4.1, but this only applies to node/npm versions that support the exports field. Looks like your node/npm combo doesn't support this but we should have still accounted for this in a breaking release.

Merging into https://github.com/GoogleChrome/lighthouse/issues/15085, but will fix this.