LHCI - 此版本 Chrome 太旧

LHCI - This version of Chrome is too old

我已经设置 google 的 lhci 与我的 CI 从 github 操作一起工作并将结果上传到私人服务器。

我遇到的一个问题是性能分数是“0”或“?”如果你打开报告。

我收到的 CLS 错误是:

This version of Chrome is too old to support 'Cumulative Layout Shift'. Use a newer version to see full results.

我在 github 操作中所做的是:

npm install @lhci/cli@0.8.x
npx lhci autorun --failOnUploadFailure=true 

好的,原来问题出在我们的自托管运行器的机器上 - 它的 chromium 版本确实过时了。

但即使在这种情况下或我们的长期解决方案中的任何其他情况下,始终通过安装 puppeteer:

提供 chrome 的新版本
npm install @lhci/cli@0.8.x
npm install puppeteer
npx lhci autorun --failOnUploadFailure=true