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.
first close the simulator, then run these on terminal
npm install
react-native run-ios
Solution -->
npm start
then open new Terminal and go to your project path and then hit
react-native run-ios
it works for me
check your network proxy , better shut it down.
or u should find an other way to maintain the packager server
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
Solve the error No bundle URL present
by:
rm -rf ios/build/; kill $(lsof -t -i:8081); react-native run-ios
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
check your 'localhost' key at NSExceptionDomains dict in info.plist
if it doesn't exist, it causes error.