I\'m just starting out with react native. Everything was going ok but now when I run \'react-native run-ios\' the packager is looking for js files in
What worked for me was reverting to 0.43.1 (a version that I have other apps working with): delete node_modules, change package.json under dependencies to "react-native": "0.43.1", and npm install
. Verify your version with react-native --version
, and run again.
This is a known issue with RN 0.45, I have also encountered this problem today after upgrading from 0.42.
https://github.com/facebook/react-native/issues/14246
The temporary solution until RN is fixed (next release?) is to run:
npm start -- -reset-cache
You can also try:
npm run start -- --root <mydir>
This will cause the packager to look in the correct location.
Until this is corrected it's a pain, as it means we have to invoke the reset every time the packager is started either from XCode or react-native run-ios
.
The next release is later this month: https://github.com/facebook/react-native/releases/tag/v0.46.0-rc.0
Update This has now been fixed in release 0.45.1