Reputation: 2528
As in image i have file and the path to file is also right. So why i am getting error that module not found?
I am new in ios development in react-native but have android app which work properly with same code.
Upvotes: 0
Views: 341
Reputation: 28539
A lot of errors like this can be caused by the cache not updating correctly. Like all things electronic they can be fix by restarting, the best thing to do is clear the cache and see if your problems persist.
You can clear the cache like this, just choose the one for your version or react-native, npm, or OS.
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache
https://gist.github.com/jarretmoses/c2e4786fd342b3444f3bc6beff32098d
Upvotes: 1