Reputation: 945
I'm using: react-native-cli: 2.0.1 react-native: 0.62.2 Xcode: 11.3.1
Creating a react-native project (react-native init GetAway) and starting it with npx react-native run-ios throws an build error:
The following build commands failed:
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
CompileSwift normal x86_64 /Users/sercan/Desktop/Arbeit/Urlaub/rescue/GetAway/ios/Pods/YogaKit/YogaKit/Source/YGLayoutExtensions.swift
(2 failures)
I have no clue, why it comes to an build error, to a new created project. If you have any ideas to solve this problem, please let me know.
Thanks in Advance
Edit: Link for full error message: https://docs.google.com/document/d/1o6tj9OrWmH-OZ5rCkYxhQTi-RYH36S5u36zpmBHHY3E/edit?usp=sharing
Upvotes: 13
Views: 17103
Reputation: 91
i fixed something similar by updating my xcode to 13 which requires that you update your macos to 11
Upvotes: 1
Reputation: 1488
In my macOS system, this build error was resolved by restarting the computer. The issue has been reported at https://github.com/facebook/react-native/issues/28777, where I also found this workaround.
Upvotes: 4
Reputation: 9
I resolved this by uninstalling the globally installed react-native-cli. The react-native environment setup docs also state this.
React Native Environment Setup Docs
Screenshot from the environment setup docs
Upvotes: 0