Skip to content

stack-pack icuMessagePaths are broken for LH npm installs #14248

Closed
@brendankenny

Description

@brendankenny

I noticed this in HTTPArchive/WPT LHRs, which have i18n keys like "../../../../home/pmeenan/wptagent/node_modules/lighthouse-stack-packs/packs/ezoic.js | unused-css-rules" in them.

It looks like it's an issue when you install lighthouse as an npm dep (i.e. not a github checkout or bundled), e.g.

mkdir tmp
cd tmp
# broken in lighthouse and lighthouse@next
npm i lighthouse
npx lighthouse https://make.wordpress.org/ --quiet --view

open devtools against the report and look at __LIGHTHOUSE_JSON__.i18n.icuMessagePaths, like

Object.keys(__LIGHTHOUSE_JSON__.i18n.icuMessagePaths).filter(p => p.startsWith('..'))

for me returns 21 paths like "../../../../tmp/node_modules/lighthouse-stack-packs/packs/react.js | unminified-css.

In practice this means you can't swap locales for stack pack strings and they'll always be in en-US.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions