Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

react-native run-ios is not working

I have a react native ios and it was working fine, suddnly it's working only in Xcode but not in terminal using this command:

react-native run-ios
react-native run-ios --device

Both of command are not working in the root directory, I tried to delete node_modules folder then run:

npm install; react-native link;

Unfortunatly it's not working, here are my logs:

enter image description here enter image description here enter image description here

Any Help!

like image 854
Hazem Hagrass Avatar asked May 23 '17 10:05

Hazem Hagrass


Video Answer


3 Answers

Seems that you have a lot of missing libraries which are not downloaded for some reason, I recommend that you should delete all downloadable libs then start over again:

  • delete node_modules/ folder
    • delete ios/Pods folder
    • delete ios/build folder
    • run: npm install
  • run: cd ios; pod install; cd../
  • run: react-native link

That's it

like image 74
Ahmed Lotfy Avatar answered Oct 27 '22 04:10

Ahmed Lotfy


I was able to solve it by upgrading node.

brew upgrade node

type this in terminal.

like image 44
Firda Sahidi Avatar answered Oct 27 '22 04:10

Firda Sahidi


There could be various reasons, in my case it was due to some of the libraries being used and I was able to figure out the solution by changing the Build Active Architecture Option.

Setting the target->Build Settings->Build Active Architecture Only option for both the app and Pods target (for both debug and Release) to Yes made it work with react native in command line while setting the above options to No made them work with Xcode.

like image 31
Kaustubh Avatar answered Oct 27 '22 02:10

Kaustubh