What is the meaning of 'No bundle URL present' in react-native?

前端 未结 30 2186
庸人自扰
庸人自扰 2020-11-30 17:22

When I run a react-native project, I get a error no bundle URL present , but I don\'t know what mistakes I do, I was very confused.

相关标签:
30条回答
  • 2020-11-30 17:29

    first close the simulator, then run these on terminal

    npm install
    
    react-native run-ios
    
    0 讨论(0)
  • 2020-11-30 17:30

    Solution --> npm start then open new Terminal and go to your project path and then hit react-native run-ios it works for me

    0 讨论(0)
  • 2020-11-30 17:30

    check your network proxy , better shut it down.

    or u should find an other way to maintain the packager server

    0 讨论(0)
  • 2020-11-30 17:30

    Execute the below command:

    killall -9 node
    rm -rf ios/build
    react-native run-ios
    

    it will open launchpackager.command and the application will install on the ios simulator

    0 讨论(0)
  • 2020-11-30 17:32

    Solve the error No bundle URL present by:

    • Running the following command in your project root directory to delete the iOS build directory, and to kill other React Native sessions (assuming they're running on default port 8081) before re-building:

    rm -rf ios/build/; kill $(lsof -t -i:8081); react-native run-ios

    • Update your React Native workflow to avoid these error occur by combining the above combination of commands into an alias and appending it to your Bash config file .bashrc with this command:

    echo "alias rni=\"kill \$(lsof -t -i:8081); rm -rf ios/build/; react-native run-ios\"" >> ~/.bashrc; source ~/.bashrc

    Now you can run React Native iOS build (without worrying about some of the common red error screens of death appearing) with a simple alias shortcut:

    rni

    0 讨论(0)
  • 2020-11-30 17:32

    check your 'localhost' key at NSExceptionDomains dict in info.plist

    if it doesn't exist, it causes error.

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