Cannot find module './assets/empty-module.js'
See original GitHub issueWhenever I try to run react-native I get this error:
react-native run-ios
module.js:474
throw err;
^
Error: Cannot find module './assets/empty-module.js'
at Function.Module._resolveFilename (module.js:472:15)
at Function.resolve (internal/module.js:27:19)
at Object.<anonymous> (/Users/esen/Github/App/node_modules/react-native/packager/react-packager/src/node-haste/DependencyGraph/ResolutionRequest.js:20:29)
at Module._compile (module.js:573:32)
at loader (/Users/esen/Github/App/node_modules/babel-register/lib/node.js:144:5)
at Object.require.extensions.(anonymous function) [as .js] (/Users/esen/Github/App/node_modules/babel-register/lib/node.js:154:7)
at Module.load (module.js:490:32)
at tryModuleLoad (module.js:449:12)
at Function.Module._load (module.js:441:3)
at Module.require (module.js:500:17)
- React Native version: 0.37.0
- Platform: Both
- Operating System: MacOS
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:9
Top Results From Across the Web
1 Answer - 1 - Stack Overflow
Error : Cannot find module './assets/empty-module.js' at Function.Module._resolveFilename (module.js:339:15) at Function.require.resolve ...
Read more >Search - appsloveworld
Coding example for the question Expo React Native Cannot find module './assets/empty-module.js'-React Native.
Read more >A brand new website interface for an even better experience!
Error : Cannot find module './assets/empty-module.js'
Read more >Configuring Metro - Meta Open Source
metro.config.js; metro.config.json; The metro field in package.json ... When Metro needs to transform a module, it first computes a ...
Read more >require.resolve "Error: Cannot find module" but ... - Reddit
require.resolve "Error: Cannot find module" but module exists in ... resolve because I'm adding dependencies in my webpack.config.js file ...
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 Free
Top 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

Also ran into this;
touch-ingempty-module.jsalso seems to do the trick:Since I didn’t intend to run
yarn cleanI removed.yarncleanand reinstalled the module - sounds like removingassetsfrom.yarncleanwould work too.