samdutton/multihouse

TypeError: perf.getEntriesByName is not a function

Opened this issue · 3 comments

I have followed the instructions carefully, but no matter what sites/URLs I want to audit, there is always this fatal error:

Error 1: Caught error for https://example.com/foo/:
TypeError: perf.getEntriesByName is not a function

node 16.5.0, Windows 10

Hi @dragan1700 — thanks for the heads-up!

I can reproduce this error using 16.5.0 on Mac 12.6.

Looks like performance.getEntriesByName() is only supported in Node from version 16.7.0: developer.mozilla.org/en-US/docs/Web/API/Performance/getEntriesByName

I've updated the README to add a Requirements section.

Using Node 16.7.0 and following the instructions in the README, I get the following:

multihouse: cd src
src: node index.js
Running Lighthouse for 1 page(s) in input.csv

Run 1 of 3: page 1 of 1
https://example.com: Performance 100
https://example.com: Accessibility 92
https://example.com: Best Practices 100
https://example.com: SEO 91
https://example.com: Progressive Web App 25

Start run 2

Run 2 of 3: page 1 of 1
https://example.com: Performance 100
https://example.com: Accessibility 92
https://example.com: Best Practices 100
https://example.com: SEO 91
https://example.com: Progressive Web App 25

Start run 3

Run 3 of 3: page 1 of 1
https://example.com: Performance 100
https://example.com: Accessibility 92
https://example.com: Best Practices 100
https://example.com: SEO 91
https://example.com: Progressive Web App 25

Completed 3 run(s) for 1 URL(s)with 0 error(s).

View output: output.csv

src: node -v
v16.17.0```



Hi @samdutton
Thanks for your swift response! Really appreciate it.
I can confirm with node 16.17.0 it works now here as well.

I'm sorry to bug you with another thing I've noticed... actually two:

a) If I only want a11y results, I do node ./index.js -r=1 -c="accessibility"
Is this the correct format/syntax, i.e. using double quotes? The start of the script seems to confirm my category choice ("Auditing categories: accessibility"), but it's doing all 5 categories regardless of that. All 5 categories are output in the terminal and output.csv.

b) There is a mismatch between the heading/value pairs as output in the terminal, as opposed to what you get in output.csv. Here's a screenshot. Compare the terminal and CSV values. Only performance and best practices match. The other ones are shifted somehow.
image

(Sorry for delay — haven't forgotten about this, but I've just returned from an event and holidays. I'll take a look.)