Make sure you’re running a packager server or
have include a .jsbundle file in your application
If you are getting this error in React Native App. you can follow the following steps to fix
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
Run following command. It will generate main.jsbundle file
yarn build:iosornpm run build:ios
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
Try to re-run your app
npx react-native run-iosorreact-native run-ios
You did it
Thank you :)