Missing package url (react native language)

Just installed react native and tried to run Hello World. Got this error in the last few hours:

 "No bundle URL present.Make sure you're running a packager server
 or have included a .jsbundle file in your application bundle."

      

I mentioned this: What does it mean to have no bind url present in react-native? and other similar questions, and tried everything: using my ip address, various run-iso combo and react-npm installers running and not running, trying to uninstall builds, clean project, restart Xcode, reuse simulator, try react on update, edit in .plist to allow arbitrary loads, manually adjust the path to my index.ios.js, everything and nothing works.

I noticed that many faced this problem when trying to build on their device. I'm not trying to do something fancy, just run "hello world".

Any other solutions that I am not aware of?

+16


source to share


7 replies


YOUR_PROJECT/ios

in YOUR_PROJECT/ios

and rm -r build

then run ' rm -r build

-native run-ios' again



+10


source


run the following code:

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

      



launchpackager.command will open and the app will be installed on the ios simulator

+5


source


Assuming you are using nvm

multiple versions of node as well, here is the solution:

  • Say what you started npm install -g react-native-cli

    in node v6.9.5

    .
  • Now make node v6.9.5

    the default by runningnvm alias default 6.9.5

  • Now run react-native run-ios

The problem is that you have multiple versions of node installed via nvm

and for installation react-native-cli

you have included or installed the latest version of node that is not marked as the default node to point to nvm

so far. When you run react-native run-ios

it opens up another new terminal window, which by default nvm

does not indicate the version of node where you installed react-native-cli

. Just follow the settings above, I hope it helps.

Answered the same: fooobar.com/questions/108974 / ...

+3


source


I have the same problem, my problem was with info.plist

me just info.plist

like this:

<key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
        <key>NSAllowsArbitraryLoadsInWebContent</key>
        <true/>
        <key>NSAllowsLocalNetworking</key>
        <true/>
    </dict>

      

from this solution fooobar.com/questions/108974 / ...

And then add the bash.bashrc config file with this command:

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

      

Then run rni

from this solution fooobar.com/questions/108974 / ...

And it works great for me.

+3


source


I have the same problem happened to me not so long ago. It looks like if you renamed the project to something else and the project folder itself has been renamed, you need to make sure you replace all instances of the old name with the new name, and remember to change your .xcscheme file names in ProjectName> ios> ProjectName.xcodeproj> xcshareddata > xcschemes. I also had to delete the build directory. Hope it works for you too!

0


source


I ran into this issue when I was trying to sync my files with iCloud Drive. I have no idea what is causing this, but as soon as I turn off my iCloud Drive and reinstall brew and Node it starts working again. I can only think that when I turned on iCloud Drive I could have two different versions of Node or any other dependency.

0


source


I got this problem after I ran the following commands to clean up the project to see the changes that were invisible due to the cache, etc.

watchman watch-del-all
rm -rf node_modules && npm install
rm -rf /tmp/metro-bundler-cache-* or npm start -- -- reset-cache
rm -rf /tmp/haste-map-react-native-packager-*  

      

The problem was caused by a comment in the dom-structure that prevented the application from running on the device. So check the comments too;)

0


source







All Articles