question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot find module 'intl'

See original GitHub issue

Provide the steps to reproduce

  1. 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:closed
  • Created 4 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
bote795commented, Jun 28, 2019

so I added bufferutil, intl, utf-8-validate Then I got the following error

Uncaught TypeError: require.resolve is not a function

This error originated from your test code, not from Cypress.

When Cypress detects uncaught errors originating from your test code it will automatically fail the current test.

Cypress could not associate this error to any specific test.

We dynamically generated a new test to display this failure.

will follow up with the cypress team. Thanks for y’alls help!

1reaction
patrickhulcecommented, Jun 28, 2019

This sounds like a cypress issue. All of these require statements are guarded by try/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 to dependencies 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found