11

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!

3
  • In which folder are you ? May 23, 2017 at 10:33
  • Can you show me an ls and pwd please ? May 23, 2017 at 10:34
  • @JulienKode I'm in the root folder, I updated the question by ls command May 23, 2017 at 13:27

4 Answers 4

14

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

1
  • [!] No `Podfile' found in the project directory. I am getting this when I run "pod install" Aug 2, 2022 at 11:53
4

I was able to solve it by upgrading node.

brew upgrade node

type this in terminal.

3
  • its $brew upgrade node Jan 10, 2019 at 10:25
  • It is brew upgrade node. brew update does not take a package name and is intended to update brew itself only. Feb 2, 2019 at 5:38
  • In my case, I had to downgrade node to version 8 to work on some legacy Angular application. I used nvm to upgrade back to a recent version of node.
    – RommelTJ
    Aug 14, 2022 at 22:53
1

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.

2
  • 1
    The answer should be a commentary. It does not provide an actual solution, but only points out possible causes to the problem presented in the question. Aug 16, 2020 at 13:52
  • 1
    Actually this presents the possible problem plus the solution for my case, which none of the above answers list. I have edited the answer in case that was not clear.
    – Kaustubh
    Aug 21, 2020 at 11:39
0

I was able to get it working using the instructions here facebook/watchman#376 :

sudo launchctl unload -F ~root/Library/LaunchAgents/com.github.facebook.watchman.plist

Don't know enough about watchman to understand why it was running as a service. But it worked anyway.

or

Uninstalling and reinstalling Watchman fixed this issue for me.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.