The app build fails when using React Native CLI

Viewed 2012

I am very fustrated. The React Native CLI is failing when building the app.

    ** BUILD FAILED **


The following build commands failed:
    CompileC /~/Library/Developer/Xcode/DerivedData/third-eknrlzcnsdfzrlhgyioqgsamgxub/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper.build/Objects-normal/x86_64/ConnectionContextStore.o /~/Projects/reactnativetest/third/ios/Pods/Flipper/xplat/Flipper/ConnectionContextStore.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
    CompileC /~/Library/Developer/Xcode/DerivedData/third-eknrlzcnsdfzrlhgyioqgsamgxub/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper.build/Objects-normal/x86_64/FlipperConnectionManagerImpl.o /~/Projects/reactnativetest/third/ios/Pods/Flipper/xplat/Flipper/FlipperConnectionManagerImpl.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
    CompileC /~/Library/Developer/Xcode/DerivedData/third-eknrlzcnsdfzrlhgyioqgsamgxub/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper.build/Objects-normal/x86_64/FlipperClient.o /~/Projects/reactnativetest/third/ios/Pods/Flipper/xplat/Flipper/FlipperClient.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
    CompileC /~/Library/Developer/Xcode/DerivedData/third-eknrlzcnsdfzrlhgyioqgsamgxub/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper.build/Objects-normal/x86_64/FlipperRSocketResponder.o /~s/Projects/reactnativetest/third/ios/Pods/Flipper/xplat/Flipper/FlipperRSocketResponder.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(4 failures)

I did uninstall Xcode and install it fresh but did not make any difference, I got exactly the same error. The errors seem to be related with the Flipper library, but Flipper is installed as a pod in the ios/Pods directory.

Yesterday I tried Expo. The installation of the expo CLI took forever and it got hanging in the iTerm window, so I kill it. But then, when typing “expo whoami”, it gave me the asnwer of “Not logged in”, which means that Expo was installed. I was able to run the app in the ios simulator.

Today, when I tried to run the app again, I got the message that Expo was not installed. Weird, since I used it yesterday. I did the Expo cli installation again today and it did the same than yesterday. It has been more than 3 hours hanging in the terminal. But when I type “expo whoami”, I get the correct answer and I am able to run the app.

Also, today I did install the latest version of Android Studio 4.1.2 (I had version 1.3). After installation, Android Studio opens a window and then quits. I researched and it seems like Android Studio does not work on Mac version greater than 10.14 (Mac OS Mojave).

Why I am having so many problems just to run the app?. Anybody else having these problems?. Any solutions?.

1 Answers

If you are not using flipper just comment it out on the Podfile, that fixed the issue for me,

How to do it,

open podfile and make sure all this is commented,

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable these next few lines.
  # use_flipper!
  # post_install do |installer|
  #   flipper_post_install(installer)
  # end

update pods

pod update

That will fix it,

If you need flipper you'll have to specify use_flipper!({ 'Flipper-Folly' => '2.3.0' }) version and run pod install

Related