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.

Unable to resolve module `./lib/js-runtime` from `node_modules/@bugsnag/core/event.js`

See original GitHub issue

When I compile the release version, I receive the following error:

react-native bundle --platform ios --dev false --entry-file index.js --bundle-output main.jsbundle

error Unable to resolve module ./lib/js-runtime from node_modules/@bugsnag/core/event.js:

None of these files exist:

  • node_modules/@bugsnag/core/lib/js-runtime(.native|.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)
  • node_modules/@bugsnag/core/lib/js-runtime/index(.native|.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx). Run CLI with --verbose flag for more details. Error: Unable to resolve module ./lib/js-runtime from node_modules/@bugsnag/core/event.js:

None of these files exist:

  • node_modules/@bugsnag/core/lib/js-runtime(.native|.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)
  • node_modules/@bugsnag/core/lib/js-runtime/index(.native|.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx) at ModuleResolver.resolveDependency (/Users/angelo/Documents/app/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:163:15) at ResolutionRequest.resolveDependency (/Users/angelo/Documents/app/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:52:18) at DependencyGraph.resolveDependency (/Users/angelo/Documents/app/node_modules/metro/src/node-haste/DependencyGraph.js:287:16) at Object.resolve (/Users/angelo/Documents/app/node_modules/metro/src/lib/transformHelpers.js:267:42) at /Users/angelo/Documents/app/node_modules/metro/src/DeltaBundler/traverseDependencies.js:434:31 at Array.map (<anonymous>) at resolveDependencies (/Users/angelo/Documents/app/node_modules/metro/src/DeltaBundler/traverseDependencies.js:431:18) at /Users/angelo/Documents/app/node_modules/metro/src/DeltaBundler/traverseDependencies.js:275:33 at Generator.next (<anonymous>) at asyncGeneratorStep (/Users/angelo/Documents/app/node_modules/metro/src/DeltaBundler/traverseDependencies.js:87:24)

Environment

@bugsnag/react-native”: “7.9.3” “react-native”: “0.63.4”

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
JoshuaNewcombeWebillcommented, Apr 15, 2021

Thank you very much for the assistance. That solved the issue 😃.

2reactions
xljonescommented, Apr 15, 2021

Hi @invyctus92, @JoshuaNewcombeWebill. lib/js-runtime.js was removed from @bugsnag/core in v7.9.2. This is very likely a React Native caching issue. Please can you clear your RN / Metro bundler cache?

react-native start --reset-cache should do the trick! (ref https://stackoverflow.com/questions/46878638/how-to-clear-react-native-cache)

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native (newer version): "Unable to resolve module"
The problem occurs with all modules that I tried to install and to import, e.g. react-renderif and native-base. Do you have any ideas...
Read more >
React Native, Typescript and VS Code: Unable to resolve ...
The problem with resolving modules turned out to be related to VS Code's typescript project helper.
Read more >
Resolve | webpack
When enabled, webpack would prefer to resolve module requests as relative requests instead of using modules from node_modules directories. webpack.config.js
Read more >
Unable to resolve "module" from "node_modules/esm/esm.js ...
Hi, I just upgraded to SDK 39 from SDK38, I tried to run my app in the iOS emulator and I get a...
Read more >
Module not found | Can not resolve module in react - YouTube
Your browser can't play this video. ... Module not found | Can not resolve module in react ... 21K views 1 year ago...
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