I have an existing project, that have been tested on an windows + android setup. Now I’m trying to run it on a macbook to test on an Iphone 11 simulator.
- react-native-cli: 2.0.1
- react-native: 0.64.0
I install the pod file and try to run
react-native run-ios
I get a the following error:
** BUILD FAILED **
The following build commands failed:
CompileC [USER]/Library/Developer/Xcode/DerivedData/andon-hkuetryxdipcrgbcxnseaqnfnaqp/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/x86_64/RCTTurboModuleManager.o [PROJECT_PATH]/node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModuleManager.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
3
Answers
Under XCode top menu, Goto XCode->Preferences -> Locations -> Open
Derived Data folder(By clicking the arrow button) (Find screenshot
for your references)
Finder will open Derived Data folder,
Delete Derived Data Folder
Start Metro server using npm start or yarn start
Perform Clean build using cmd+shift+k
Run the application using cmd+r
Probably very late to answer.
I started facing this issue after I upgraded from
0.63.4
to0.64.2
.If we run from command line was not getting any way to find out the error. When I ran from x-code, found following error message,
The reason for that was the following entry in my podfile,
After I deleted the above entry it started working like a charm.
ref: https://github.com/facebook/react-native/issues/31250#issuecomment-808312355
I encountered this problem while running a React Native iOS app on macOS. After researching the issue for hours I was able to resolve it with these steps:
Clear the cache of
pod
by running these commands:rm -rf ~/Library/Caches/CocoaPods
rm -rf Pods
rm -rf ~/Library/Developer/Xcode/DerivedData/*
pod deintegrate
pod setup
Navigate to the ios directory, and delete the
Pods
directoryWhile still in the ios directory, run
pod install
Navigate back to the project directory, and run
npx react-native run-ios
Hope this helps you too!