React-native iOS app not running on terminal and Xcode also

1.4k Views Asked by At

Hello I'm Beginner in React Native, I've installed everything did they said.

Now I've created application using below command
react-native init TempApp

Application is created successfully

Now I try to run application using below command
npx react-native run-ios

I got below error

** BUILD FAILED **

The following build commands failed: CompileSwift normal x86_64 /Users/encora/Documents/Paresh\ Workspace/React\ Native\ Projects/TempApp/ios/Pods/YogaKit/YogaKit/Source/YGLayoutExtensions.swift

CompileC /Users/encora/Library/Developer/Xcode/DerivedData/TempApp-fnxepatpnxxjncbfdflpymtfxxag/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/x86_64/SysUio.o /Users/encora/Documents/Paresh\ Workspace/React\ Native\ Projects/TempApp/ios/Pods/RCT-Folly/folly/portability/SysUio.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (2 failures)

Even I try to run application from Xcode also, but I still get error in Xcode also.

Can anyone help me please how to run first react application on Mac

1

There are 1 best solutions below

3
shruti garg On

Try this - Close the Xcode,delete node_modules folder and then run commands in project directory

npm install / yarn install
cd ios && pod install --repo-update
npx react-native run-ios

Option 3 is optional either run project from terminal or from Xcode