Cannot find module 'intl'
See original GitHub issueProvide the steps to reproduce
- Run LH on cypress
import lighthouse from 'lighthouse';
describe('My First Test', function() {
it('Does not do much!', function() {
expect(true).to.equal(true);
});
});
repo with example: https://github.com/bote795/cypress-test-tiny
npm run cypress:run
What is the current behavior?
Doesn’t really get past the first line Error: Cannot find module ‘intl’ from ‘/Users/nicolasbotello/Documents/workspace/code/rmc/node_modules/lighthouse/lighthouse-core/lib/i18n’
What is the expected behavior?
file to run successfully don’t get any errors.
Environment Information
- Affected Channels:
- Lighthouse version: 5.1.0
- Node.js version:v10.15.0
- Operating System: Macos
Related issues Not sure if this is a lighthouse or cypress issue?
Issue Analytics
- State:
- Created 4 years ago
- Comments:7
Top Results From Across the Web
Runtime Error Cannot find module "intl" · Issue #46 - GitHub
i tried to integrate date picker bu ti am getting this error: Runtime Error Cannot find module "intl" stacktrace: Error: Cannot find module...
Read more >intl - npm
Start using intl in your project by running `npm i intl`. ... when the Intl APIs are missing, or if the built-in Intl...
Read more >react intl npm package locale data folder not found
I am trying to implement i18n in my react js application but when i am running command npm i react-intl. It's installed but...
Read more >Overview | Format.JS
If your node version is missing any of the Intl APIs above, you'd have to ... The react-intl npm package distributes the following...
Read more >atlaskit dependency causes error - Atlassian Community
Module not found: Can't resolve 'react-intl-next' in .....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
so I added
bufferutil
,intl
,utf-8-validate
Then I got the following errorwill follow up with the cypress team. Thanks for y’alls help!
This sounds like a cypress issue. All of these
require
statements are guarded bytry
/catch
and in normal node execution should pass right on through the optional requires just fine.That being said, we should probably be moving our
intl
dependency todependencies
though as @connorjclark points out. Right now most node consumers probably don’t know they would need to install this package manually for complete i18n support.