I'm trying to implement Playwright tests with lighthouse to get performance metrics. using library and using the sample code - https://github.com/abhinaba-ghosh/playwright-lighthouse. but I'm getting error, please refer attached image.

enter image description here

1

There are 1 best solutions below

0
On

Try to change

const ReportGenerator = require('Lighthouse/report/generator/report-generator')

to

const ReportGenerator = require('Lighthouse/report/generator/report-generator').default

and see if it's work