entry point for packager

后端 未结 2 479
旧时难觅i
旧时难觅i 2020-12-21 12:04

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



        
相关标签:
2条回答
  • 2020-12-21 12:11

    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.

    0 讨论(0)
  • 2020-12-21 12:28

    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

    0 讨论(0)
提交回复
热议问题