1

I have been using react native 0.68 version on my new mac m1 pro chip. My code is working on android but on iOS i am getting "no bundle URL present error". If i manually create main.jsbundle file and then run it, then the app is working fine but, for that every-time i need to create the bundle file if i am updating my code.

So, any one have face this kind of issue?

NoBundleURLError

Divyang Solanki
  • 901
  • 1
  • 9
  • 24
  • 1
    Does this answer your question? [What is the meaning of 'No bundle URL present' in react-native?](https://stackoverflow.com/questions/42610070/what-is-the-meaning-of-no-bundle-url-present-in-react-native) – Milore Dec 19 '22 at 09:41

3 Answers3

0

Open a terminal window cd into YOUR_PROJECT/ios Remove the build folder with

rm -r build

Run

react-native run-ios 

again.

Alternatively, you could open Finder, navigate to YOUR_PROJECT/ios and delete the build folder.

Then run react-native run-ios again.

Jatin Bhuva
  • 1,301
  • 1
  • 4
  • 22
0
--> open ios file project with xcode
--> in project bundle delete main.jsbundle file
--> add new empty file by main.jsbundle name
-->Run command: react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios
--> now react-native run-ios
Ankit Vora
  • 568
  • 2
  • 12
0

I solved by doing this:

Open host file sudo vi /private/etc/hosts Add three line if it's not exist

127.0.0.1 localhost
255.255.255.255 localhost
::1 localhost
Divyang Solanki
  • 901
  • 1
  • 9
  • 24