Unable to resolve module `./lib/js-runtime` from `node_modules/@bugsnag/core/event.js`
See original GitHub issueWhen 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
fromnode_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:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top 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 >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
Thank you very much for the assistance. That solved the issue 😃.
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)