Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR: main.jsbundle does not exist - React Native 0.60.4

I'm trying to publish my first React Native app in App store and when I'll build in Xcode:
Product > Archive
appears some error, but i already have main.jsbundle

main.jsbundle does not exist. This must be a bug with

  • echo 'React Native

Screen Error:

Screen Error

like image 442
Luis Lança Avatar asked Aug 26 '19 19:08

Luis Lança


Video Answer


2 Answers

You can generate a new main.jsbundle using this command.

react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios

Run this command in your project directory.

like image 88
Jay Avatar answered Oct 31 '22 14:10

Jay


In my case, I was able to fix the issue by removing main.jsbundle from Bundle Resources.

  • Open react native project in xcode
  • Check if Copy Bundle Resources build phase contains main.jsbundle
  • If it contains, remove it and build again

enter image description here

like image 21
Jason Jin Avatar answered Oct 31 '22 16:10

Jason Jin