0

enter image description here

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.

2
  • 1
    Try clearing your cache and run the project again gist.github.com/jarretmoses/c2e4786fd342b3444f3bc6beff32098d Commented Jan 27, 2019 at 17:22
  • Great. I will write a proper answer so that if others get stuck they can find it. If you can accept it that would be great. Commented Jan 27, 2019 at 17:42

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.