main.jsbundle does not exist [fixed]

Onexlab
2 min readJun 10, 2020

No bundle URL present.

Make sure you’re running a packager server or
have include a .jsbundle file in your application
bundle.

If you are getting this error in React Native App. you can follow following steps to fix

Video Tutorial

Step 1:

Open the package.json file and add the following line

"build:ios": "react-native bundle --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios'"

Now your file looks like this following screenshot

Step 2:

Run following command. It will generate main.jsbundle file

yarn build:iosornpm run build:ios

Step 3:

Open iOS project in Xcode show as following screenshot

Select -> Target → Build Phases

under Copy Bundle Resources click on the plus button as following screenshot.

It will show you the prompt as shown below. Then select the file main.jsbundle and click on the Add button

Step 4:

Try to re-run your app

npx react-native run-iosorreact-native run-ios

Step 5:

You did it

Thank you :)

--

--