react-native: React Native BUILD FAILED on run-ios
React Native version
System: OS: macOS 10.14.6 CPU: (4) x64 Intel® Core™ i5-7500 CPU @ 3.40GHz Memory: 249.73 MB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 10.13.0 - ~/.nvm/versions/node/v10.13.0/bin/node Yarn: 1.12.3 - /usr/local/bin/yarn npm: 6.4.1 - ~/.nvm/versions/node/v10.13.0/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3 IDEs: Android Studio: 3.4 AI-183.6156.11.34.5692245 Xcode: 10.3/10G8 - /usr/bin/xcodebuild npmPackages: react: 16.8.6 => 16.8.6 react-native: 0.60.5 => 0.60.5 npmGlobalPackages: react-native-cli: 2.0.1
Steps To Reproduce
- init a project with
react-native init FirstNative
- run
cd FirstNative
and runreact-native run-ios
- I got error same with Result
- To retry, init another project with
react-native init TestNativeProject
- run
cd TestNativeProject
andreact-native run-ios
- I got same error written at Result
Expected Behavior
Success of building the project
Result
The result is following error.
** BUILD FAILED **
The following build commands failed: CompileC /Users/LeeMoonki/Desktop/FirstNative/ios/build/FirstNative/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Folly.build/Objects-normal/x86_64/Unicode.o /Users/LeeMoonki/Desktop/TestNativeProject/ios/Pods/Folly/folly/Unicode.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (1 failure)
To see the exact error, I run the workspace of this project in the Xcode(v10.3) then the following error is occurred.
'folly/CppAttributes.h' file not found ColdClass.h
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 12
- Comments: 53 (1 by maintainers)
On Feb 8th 2021 still have this shitty error and everywhere is closed
@saulo1212 try to replace
use_flipper!
withuse_flipper!({ 'Flipper-Folly' => '2.3.0' })
in your Podfile, then remove Podfile.lock and runpod install
I struggled to build react native project in iOS with this issue. And I did build after following processes.
pod
withPods
directory. The location of it isproject directory > ios > Pods
.project directory > ios
location, install pod withpod install
react-native run-ios
in project directory.After I faced the issue, I try to build the project in another Mac and work fine. And I found the every error is from
folly
and it is inPods
. Then I comparedPods
directory between mine and another Mac environment. In my case, there are missing files. So I reference the comment written by kelset in ‘folly/folly-config.h’ file not found, said “This happens when your pod cache is corrupted.”. So I check the way of clearing cache of pod, and it works.Having this error too
–> this version no longer works as of writing. It should be
use_flipper!({ 'Flipper-Folly' => '2.5' })
alreadyuse_flipper!({ ‘Flipper-Folly’ => ‘2.3.0’ }) and use_flipper!({ ‘Flipper-Folly’ => ‘2.5’ }) didn’t work for me. The only way I could get to build is to comment out use_flipper!() completely.
Still facing this issue!!
This solution might help you out. https://github.com/facebook/react-native/issues/24450#issuecomment-516760157
This one should help you: https://github.com/facebook/react-native/issues/31480
Same as me, seems to have re-appeared +2
Same as me, seems to have re-appeared +1
hello, I managed to solve my problem, sometimes it can work with you too, my pod was in version 1.10, I just returned to version 1.9, working normal so far.
It’s incredible that you need to reach this point to make it work, thank you.
System: OS: macOS 11.2.1 CPU: (12) x64 Intel® Core™ i7-9750H CPU @ 2.60GHz Memory: 1.70 GB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 14.15.1 - /usr/local/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 6.14.8 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.10.1 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2 Android SDK: Not Found IDEs: Android Studio: 4.1 AI-201.8743.12.41.7042882 Xcode: 12.4/12D4e - /usr/bin/xcodebuild Languages: Java: 15.0.1 - /usr/bin/javac Python: 3.7.6 - /Users/rejovarghese/opt/anaconda3/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.13.1 => 16.13.1 react-native: 0.63.4 => 0.63.4 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Error shown
The following build commands failed: CompileC /Users//Library/Developer/Xcode/DerivedData/testProj-gttdtokougyaeyaukpnbpyhshzvf/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper.build/Objects-normal/x86_64/FlipperRSocketResponder.o /Users//Dafidy/Testing/testProj/ios/Pods/Flipper/xplat/Flipper/FlipperRSocketResponder.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (1 failure)
getting error by doing react-native init testProj cd testProj npx react-native run-ios