80

Nowadays everytime I create a new project react-native init ProjectName and after it is created I do npx pod-install and then react-native run-ios it gives me error. It happens with every project that I create new.

I'm not sure if there is an update that I have to do but here is the error:

CompileC /Users/chaudhrytalha/Library/Developer/Xcode/DerivedData/testapp-fdikhqqgempmsagsnliemealffwv/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FlipperKit.build/Objects-normal/x86_64/FlipperClient.o /Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/FlipperKit/iOS/FlipperKit/FlipperClient.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'FlipperKit' from project 'Pods')
    cd /Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods
    export LANG\=en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c++ -target x86_64-apple-ios10.0-simulator -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -std\=gnu++14 -stdlib\=libc++ -fobjc-arc -fmodules -fmodules-cache-path\=/Users/chaudhrytalha/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/chaudhrytalha/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -fmodule-name\=FlipperKit -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror\=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror\=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror\=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -Wno-c++11-extensions -DPOD_CONFIGURATION_DEBUG\=1 -DDEBUG\=1 -DCOCOAPODS\=1 -DFB_SONARKIT_ENABLED\=1 -DOBJC_OLD_DISPATCH_PROTOTYPES\=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -Winvalid-offsetof -g -Wno-sign-conversion -Winfinite-recursion -Wmove -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wrange-loop-analysis -Wno-semicolon-before-method-body -Wunguarded-availability -fobjc-abi-version\=2 -fobjc-legacy-dispatch -index-store-path /Users/chaudhrytalha/Library/Developer/Xcode/DerivedData/testapp-fdikhqqgempmsagsnliemealffwv/Index/DataStore -I/Users/chaudhrytalha/Library/Developer/Xcode/DerivedData/testapp-fdikhqqgempmsagsnliemealffwv/Build/Products/Debug-iphonesimulator/FlipperKit/include -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Headers/Private -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Headers/Private/FlipperKit -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Headers/Public -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Headers/Public/Flipper-DoubleConversion -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Headers/Public/Flipper-Folly -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Headers/Public/Flipper-Glog -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Headers/Public/Flipper-PeerTalk -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Headers/Public/Flipper-RSocket -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Headers/Public/FlipperKit -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Headers/Public/Yoga -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/FlipperKit/iOS/FlipperKit -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Headers/Private/FlipperKit -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/boost-for-react-native -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/boost-for-react-native -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/libevent/include -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/boost-for-react-native -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Flipper-DoubleConversion -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/FlipperKit/iOS/\*\* -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/libevent/include -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/boost-for-react-native -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Flipper-DoubleConversion -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/libevent/include -IHeaders/Private/FlipperKit -IHeaders/Private/FlipperKit/CppBridge -IHeaders/Private/FlipperKit/FBCxxFollyDynamicConvert -IHeaders/Private/FlipperKit/FBDefines -IHeaders/Private/FlipperKit/FKPortForwarding -IHeaders/Private/FlipperKit/FlipperKitHighlightOverlay -IHeaders/Private/FlipperKit/FlipperKitLayoutPlugin -IHeaders/Private/FlipperKit/FlipperKitLayoutTextSearchable -IHeaders/Private/FlipperKit/FlipperKitNetworkPlugin -IHeaders/Private/FlipperKit/FlipperKitReactPlugin -IHeaders/Private/FlipperKit/FlipperKitUserDefaultsPlugin -IHeaders/Private/FlipperKit/SKIOSNetworkPlugin -I/Users/chaudhrytalha/Library/Developer/Xcode/DerivedData/testapp-fdikhqqgempmsagsnliemealffwv/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FlipperKit.build/DerivedSources-normal/x86_64 -I/Users/chaudhrytalha/Library/Developer/Xcode/DerivedData/testapp-fdikhqqgempmsagsnliemealffwv/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FlipperKit.build/DerivedSources/x86_64 -I/Users/chaudhrytalha/Library/Developer/Xcode/DerivedData/testapp-fdikhqqgempmsagsnliemealffwv/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FlipperKit.build/DerivedSources -F/Users/chaudhrytalha/Library/Developer/Xcode/DerivedData/testapp-fdikhqqgempmsagsnliemealffwv/Build/Products/Debug-iphonesimulator/FlipperKit -F/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/OpenSSL-Universal/Frameworks -F/Users/chaudhrytalha/Library/Developer/Xcode/DerivedData/testapp-fdikhqqgempmsagsnliemealffwv/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/OpenSSL -fmodule-map-file\=/Users/chaudhrytalha/Library/Developer/Xcode/DerivedData/testapp-fdikhqqgempmsagsnliemealffwv/Build/Products/Debug-iphonesimulator/YogaKit/YogaKit.modulemap -fmodule-map-file\=/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Headers/Public/yoga/Yoga.modulemap -DDEBUG\=1 -DFLIPPER_OSS\=1 -DFB_SONARKIT_ENABLED\=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE\=1 -DFOLLY_USE_LIBCPP\=1 -DFOLLY_HAVE_LIBGFLAGS\=0 -DFOLLY_HAVE_LIBJEMALLOC\=0 -DFOLLY_HAVE_PREADV\=0 -DFOLLY_HAVE_PWRITEV\=0 -DFOLLY_HAVE_TFO\=0 -DFOLLY_USE_SYMBOLIZER\=0 -include /Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Target\ Support\ Files/FlipperKit/FlipperKit-prefix.pch -MMD -MT dependencies -MF /Users/chaudhrytalha/Library/Developer/Xcode/DerivedData/testapp-fdikhqqgempmsagsnliemealffwv/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FlipperKit.build/Objects-normal/x86_64/FlipperClient.d --serialize-diagnostics /Users/chaudhrytalha/Library/Developer/Xcode/DerivedData/testapp-fdikhqqgempmsagsnliemealffwv/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FlipperKit.build/Objects-normal/x86_64/FlipperClient.dia -c /Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/FlipperKit/iOS/FlipperKit/FlipperClient.mm -o /Users/chaudhrytalha/Library/Developer/Xcode/DerivedData/testapp-fdikhqqgempmsagsnliemealffwv/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FlipperKit.build/Objects-normal/x86_64/FlipperClient.o

CompileC /Users/chaudhrytalha/Library/Developer/Xcode/DerivedData/testapp-fdikhqqgempmsagsnliemealffwv/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FlipperKit.build/Objects-normal/x86_64/FlipperCppBridgingConnection.o /Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/FlipperKit/iOS/FlipperKit/CppBridge/FlipperCppBridgingConnection.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'FlipperKit' from project 'Pods')
    cd /Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods
    export LANG\=en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c++ -target x86_64-apple-ios10.0-simulator -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -std\=gnu++14 -stdlib\=libc++ -fobjc-arc -fmodules -fmodules-cache-path\=/Users/chaudhrytalha/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/chaudhrytalha/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -fmodule-name\=FlipperKit -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror\=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror\=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror\=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -Wno-c++11-extensions -DPOD_CONFIGURATION_DEBUG\=1 -DDEBUG\=1 -DCOCOAPODS\=1 -DFB_SONARKIT_ENABLED\=1 -DOBJC_OLD_DISPATCH_PROTOTYPES\=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -Winvalid-offsetof -g -Wno-sign-conversion -Winfinite-recursion -Wmove -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wrange-loop-analysis -Wno-semicolon-before-method-body -Wunguarded-availability -fobjc-abi-version\=2 -fobjc-legacy-dispatch -index-store-path /Users/chaudhrytalha/Library/Developer/Xcode/DerivedData/testapp-fdikhqqgempmsagsnliemealffwv/Index/DataStore -I/Users/chaudhrytalha/Library/Developer/Xcode/DerivedData/testapp-fdikhqqgempmsagsnliemealffwv/Build/Products/Debug-iphonesimulator/FlipperKit/include -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Headers/Private -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Headers/Private/FlipperKit -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Headers/Public -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Headers/Public/Flipper-DoubleConversion -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Headers/Public/Flipper-Folly -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Headers/Public/Flipper-Glog -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Headers/Public/Flipper-PeerTalk -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Headers/Public/Flipper-RSocket -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Headers/Public/FlipperKit -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Headers/Public/Yoga -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/FlipperKit/iOS/FlipperKit -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Headers/Private/FlipperKit -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/boost-for-react-native -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/boost-for-react-native -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/libevent/include -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/boost-for-react-native -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Flipper-DoubleConversion -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/FlipperKit/iOS/\*\* -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/libevent/include -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/boost-for-react-native -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Flipper-DoubleConversion -I/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/libevent/include -IHeaders/Private/FlipperKit -IHeaders/Private/FlipperKit/CppBridge -IHeaders/Private/FlipperKit/FBCxxFollyDynamicConvert -IHeaders/Private/FlipperKit/FBDefines -IHeaders/Private/FlipperKit/FKPortForwarding -IHeaders/Private/FlipperKit/FlipperKitHighlightOverlay -IHeaders/Private/FlipperKit/FlipperKitLayoutPlugin -IHeaders/Private/FlipperKit/FlipperKitLayoutTextSearchable -IHeaders/Private/FlipperKit/FlipperKitNetworkPlugin -IHeaders/Private/FlipperKit/FlipperKitReactPlugin -IHeaders/Private/FlipperKit/FlipperKitUserDefaultsPlugin -IHeaders/Private/FlipperKit/SKIOSNetworkPlugin -I/Users/chaudhrytalha/Library/Developer/Xcode/DerivedData/testapp-fdikhqqgempmsagsnliemealffwv/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FlipperKit.build/DerivedSources-normal/x86_64 -I/Users/chaudhrytalha/Library/Developer/Xcode/DerivedData/testapp-fdikhqqgempmsagsnliemealffwv/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FlipperKit.build/DerivedSources/x86_64 -I/Users/chaudhrytalha/Library/Developer/Xcode/DerivedData/testapp-fdikhqqgempmsagsnliemealffwv/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FlipperKit.build/DerivedSources -F/Users/chaudhrytalha/Library/Developer/Xcode/DerivedData/testapp-fdikhqqgempmsagsnliemealffwv/Build/Products/Debug-iphonesimulator/FlipperKit -F/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/OpenSSL-Universal/Frameworks -F/Users/chaudhrytalha/Library/Developer/Xcode/DerivedData/testapp-fdikhqqgempmsagsnliemealffwv/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/OpenSSL -fmodule-map-file\=/Users/chaudhrytalha/Library/Developer/Xcode/DerivedData/testapp-fdikhqqgempmsagsnliemealffwv/Build/Products/Debug-iphonesimulator/YogaKit/YogaKit.modulemap -fmodule-map-file\=/Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Headers/Public/yoga/Yoga.modulemap -DDEBUG\=1 -DFLIPPER_OSS\=1 -DFB_SONARKIT_ENABLED\=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE\=1 -DFOLLY_USE_LIBCPP\=1 -DFOLLY_HAVE_LIBGFLAGS\=0 -DFOLLY_HAVE_LIBJEMALLOC\=0 -DFOLLY_HAVE_PREADV\=0 -DFOLLY_HAVE_PWRITEV\=0 -DFOLLY_HAVE_TFO\=0 -DFOLLY_USE_SYMBOLIZER\=0 -include /Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/Target\ Support\ Files/FlipperKit/FlipperKit-prefix.pch -MMD -MT dependencies -MF /Users/chaudhrytalha/Library/Developer/Xcode/DerivedData/testapp-fdikhqqgempmsagsnliemealffwv/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FlipperKit.build/Objects-normal/x86_64/FlipperCppBridgingConnection.d --serialize-diagnostics /Users/chaudhrytalha/Library/Developer/Xcode/DerivedData/testapp-fdikhqqgempmsagsnliemealffwv/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FlipperKit.build/Objects-normal/x86_64/FlipperCppBridgingConnection.dia -c /Users/chaudhrytalha/Documents/xCodeProjects/Learning\ React\ Native/testapp/ios/Pods/FlipperKit/iOS/FlipperKit/CppBridge/FlipperCppBridgingConnection.mm -o /Users/chaudhrytalha/Library/Developer/Xcode/DerivedData/testapp-fdikhqqgempmsagsnliemealffwv/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FlipperKit.build/Objects-normal/x86_64/FlipperCppBridgingConnection.o

warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'Flipper-Glog' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'YogaKit' from project 'Pods')
warning: no rule to process file '/Users/chaudhrytalha/Documents/xCodeProjects/Learning React Native/testapp/ios/Pods/Flipper-RSocket/rsocket/README.md' of type 'net.daringfireball.markdown' for architecture 'x86_64' (in target 'Flipper-RSocket' from project 'Pods')
warning: no rule to process file '/Users/chaudhrytalha/Documents/xCodeProjects/Learning React Native/testapp/ios/Pods/Flipper-RSocket/rsocket/benchmarks/CMakeLists.txt' of type 'text' for architecture 'x86_64' (in target 'Flipper-RSocket' from project 'Pods')
warning: no rule to process file '/Users/chaudhrytalha/Documents/xCodeProjects/Learning React Native/testapp/ios/Pods/Flipper-RSocket/rsocket/benchmarks/README.md' of type 'net.daringfireball.markdown' for architecture 'x86_64' (in target 'Flipper-RSocket' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'boost-for-react-native' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'Flipper-DoubleConversion' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.4, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'Flipper-PeerTalk' from project 'Pods')
warning: Skipping duplicate build file in Compile Sources build phase: /Users/chaudhrytalha/Documents/xCodeProjects/Learning React Native/testapp/node_modules/react-native/React/FBReactNativeSpec/Native/testapp/node_modules/react-native/React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec-generated.mm (in target 'FBReactNativeSpec' from project 'Pods')
warning: Skipping duplicate build file in Copy Headers build phase: /Users/chaudhrytalha/Documents/xCodeProjects/Learning React Native/testapp/node_modules/react-native/React/FBReactNativeSpec/Native/testapp/node_modules/react-native/React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h (in target 'FBReactNativeSpec' from project 'Pods')

** BUILD FAILED **


The following build commands failed:
        PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/chaudhrytalha/Library/Developer/Xcode/DerivedData/testapp-fdikhqqgempmsagsnliemealffwv/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-6B583FC85C8A2C3CF6842DBACCA71427.sh

It's a huge error so I included the last few lines. Before this, I use to run the apps smoothly but this just started recently.

If I open XCode and run the app from there then the app runs.

Chaudhry Talha
  • 7,231
  • 11
  • 67
  • 116
  • Hello, did you get this fixed? – Ritviz Sharma Mar 27 '21 at 19:24
  • I was able to make it work by but this way is NOT RECOMMENDED. You start with uninstalling node, nvm, npm, and even react-native. Then installing them all again works for me. – Chaudhry Talha Mar 28 '21 at 04:17
  • You haven't included the error in the above. Try using [this](https://stackoverflow.com/a/14625517/6606831) and post a complete log – Pritish Vaidya Mar 29 '21 at 15:05
  • What worked for me: the problem was that my code was on iCloud, and Apple adds a space on the "Mobile Documents" folder, which caused the error. I created a "Projects" folder locally on my computer, making sure the complete path had no spaces or special characters, and reinstalled the project. – mdeotti May 25 '23 at 19:26

31 Answers31

44

I'm running my React Native app on m1 and my problem was with nvm which I set the default alias. I just run the nvm unalias default and it solved the issue.

davychhouk
  • 1,549
  • 2
  • 16
  • 20
  • 1
    Same thing for me. But it's problematic to unset default, now terminal prompt errors each time because there is no default version. What did you do for that ? – FR073N Nov 25 '21 at 12:11
  • To tackle that, I only install one version of node, and uninstall all the other versions. It seems to be working good for me. – davychhouk Nov 26 '21 at 01:19
  • 4
    One of the advantages of using nvm is to have multiple versions of node, so I think we should find a better solution^^ – FR073N Dec 02 '21 at 17:12
  • 2
    This answer deserve to go in first place xD Thank you – Marlaurita Apr 11 '22 at 18:34
  • 4
    I just tested this solution. It works but without a default node version. I ran `nvm unalias default` and reran my app. It launched. Nice! But I wanted to reproduce this error for further debugging, so I ran `nvm alias default node` and launched the app. It launched without error. So I think something gets cached and unlinking/relinking the node default resets the cache. I don't know exactly what happens but I'm happy with the result. – Mike S. Apr 19 '22 at 14:02
  • 1
    You just saved me hours of endless search. – Marvelous Ikechi May 11 '22 at 09:12
  • 1
    This worked for me on an Intel Mac as well. Thankfully I remembered setting this alias.... – tjeisenschenk May 19 '22 at 09:19
  • 2
    this worked for me....but with 1- open the terminal in Rosetta mode 2- make "nvm unalias default" – Ebrahim Sayed Jun 29 '22 at 10:02
  • 1
    after spending time uninstalling and installing pods, uninstalling and installing xcode and ripping some hairs, THIS was the solution that worked for me. Thanks! – marcoj Aug 24 '22 at 21:08
  • If you use nvm, add a .nvmrc in every project to specify which version you want. Then you don't need a default. However this solution did not solve the problem for me. – Mnebuerquo Oct 12 '22 at 13:50
  • Have the same issue nothing works for me – Antoni Mar 24 '23 at 13:08
38

I've been trying to solve this problem for days on MacOS M1 Big Sur. Nobody else's exact solution worked for me, so I'm going to describe how I came to my solution. Hopefully the process will help someone else figure out what works for them.

Everything (for me) needed to be running in Rosetta. Make sure Xcode is running in Rosetta. Make sure your Terminal is running in Rosetta. Make sure pod, yarn, npm, whatever you use, is running the x86 version, not the arm64 version. Make sure you ran yarn install/npm install/pod install with the x86 versions, not the arm64 versions.

To clarify arm64 vs. x86, you should ask your Terminal which yarn, which node, which npm, which pod to see the full path to those executables. This is complicated by there being so many ways to install node. I installed node through Homebrew, so my paths below reflect that.

For Homebrew on x86 (running in Rosetta Terminal), you should see:

$ which node
/usr/local/homebrew/bin/node
$ which yarn
/usr/local/homebrew/bin/yarn
$ which npm
/usr/local/homebrew/bin/npm

Note the /usr/local/homebrew/bin. If you're not running in Rosetta Terminal, you'll see /opt/homebrew/bin. If you're seeing /opt/homebrew/bin anywhere, it's a red flag.

Another trap, easy to fall into... I was in Rosetta Terminal with the x86 node, but I realized that my global yarn installation was /opt/homebrew/bin/yarn. I was doing yarn install with arm64 yarn, which can cause problems with your dependencies.

Seriously, run all the commands above as a sanity check.

Things still weren't working. Same error in Xcode, a mysterious PhaseScriptExecution error on some FBReactNativeSpec.build/Script-********.sh. I opened up Script-********.sh, and saw that it called node_modules/react-native/scripts/generate-specs.sh, which in turned called another script find-node.sh.

find-node.sh led me to my problem. I put "echo" debugging statements all over it, and then I ran find-node.sh directly to see what was printed. Sure enough, this one caught something:

elif [[ -x "$(command -v brew)" && -s "$(brew --prefix nvm)/nvm.sh" ]]; then
  echo "AM I GOING CRAZY?"
  . "$(brew --prefix nvm)/nvm.sh"
fi

I have no idea what this script is doing, but back in my Terminal I ran echo $(brew --prefix nvm), which output /usr/local/homebrew/opt/nvm. Clearly, the react-native script is making some kind of decision based on its finding nvm.

I don't want nvm to be part of my equation at all; I'm not using it. So in both Rosetta Terminal and Terminal, I brew uninstall nvm.

Back in XCode, clean build folder, rebuild, and it works.

This is not going to be a satisfying answer for many, as these exact steps will likely not work for you. No one else's exact steps worked for me.

After reading dozens of solutions to this problem, it seems that most of them have causes that are node version/path/architecture related. I hope this answer gives you some tools to investigate that yourself. Namely:

  1. Make sure which node/yarn/npm is pointing to the correct x86 path.
  2. Make sure you installed your node_modules with the correct x86 executable.
  3. Debug your node_modules/react-native/scripts/find-node.sh to see if you're tripping up on any extraneous node things in your environment.
Neil Hansen
  • 531
  • 4
  • 7
  • 2
    Removing nvm solved it for me. Thanks for putting this answer together! – Denys Kniazhev-Support Ukraine Nov 03 '21 at 16:12
  • 1
    Thanks so much! Removing nvm resolved it for me, I had been using asdf but hadn't removed nvm. – ourmaninamsterdam Nov 29 '21 at 12:13
  • Removing nvm resolved it for me! – RadekR Jan 03 '22 at 13:06
  • Thanks much. Removing nvm worked for me as well. But now I am not sure how to switch between different versions of node. – atitpatel Feb 10 '22 at 23:47
  • Nailed it! Thanks for this, very clear answer – cleblanc Feb 11 '22 at 17:01
  • Rationalize this: I have an M1 chip; I have NVM installed... I have one project that I initiated using `npx react-native init` 1 month ago. This project compiles and runs fine. Today, I am doing `npx react-native init` again, `cd ios; pod install` and the thing booms with OP's error. – damusix Jun 23 '22 at 18:08
  • FYI: Using Rosetta is no longer a viable solution. I would avoid it because it's too easy to forget which app does/does not use it. If you're unsure of app compatibility check this site. https://isapplesiliconready.com/ – Mike S. Aug 11 '22 at 15:15
37

The problem is because you have the project created inside a folder with a name that contains spaces, example: "React Native", rename your folder to "React-Native" and rerun the command npx react-native run-ios, that should be enough.

When you execute the command npx react-native run-ios it may create a new folder for you, you must delete the folder that was generated automatically and keep the folder that you renamed at the beginning as "React-Native". Once the automatically generated folder is deleted, run the command again: npx react-native run-ios

Remember: Do not create React Native projects inside folders that contain spaces between their names.

I hope to be helpful. Greetings.

Angel Guillen
  • 531
  • 4
  • 11
  • 1
    My folder structure was documents/royal protocol/react native/ and I had to remove all spaces in all parent folders to resolve this issue. thanks for the solution – loekTheDreamer Feb 15 '22 at 07:54
  • 1
    same with me! so annoying! if you check out the contents of the script at `/some/long/path/to/Script-6B583FC85C8A2C3CF6842DBACCA71427.sh` which is output in the error, you'll see it's running a command with a path that is not escaped by spaces. – jperl Apr 11 '22 at 03:25
  • 3
    I cannot thank you enough, I tried every possible solution out there and spent days on it but in the end this fixed the issue. – Moiz May 17 '22 at 20:52
  • Thank you so much mate. That is the problem. I copied my app into the Downloads folder & then run it. Now its working. Thanks again – Muhammad Talha Aug 29 '22 at 06:49
  • Awesome. This solution works well. – Pawara Siriwardhane Jan 24 '23 at 11:12
  • oh Thanks man, I was wondering for an hour, you saved my time – NAZIR HUSSAIN Mar 31 '23 at 08:40
  • As silly as it sounds , but this fixed in my case . Thank you ! – Nirmal Kumar Apr 10 '23 at 08:57
11

I got past this by removing nvm and reinstalling afterwards. I also removed the check lines from my .zshrc

rm -rf ~/.nvm
Scott
  • 805
  • 7
  • 19
10

Thank you @Neil Hasen for the detailed explanation. Instead of uninstalling nvm because I use it in a number of projects, I simply commented out the code in ./node_modules that referenced the nvm.

if [[ -s "$HOME/.nvm/nvm.sh" ]]; then
    # shellcheck source=/dev/null
    . "$HOME/.nvm/nvm.sh"
elif [[ -x "$(command -v brew)" && -s "$(brew --prefix nvm)/nvm.sh" ]];      
then
    # shellcheck source=/dev/null
    . "$(brew --prefix nvm)/nvm.sh"   
fi

The code can be found in node_modules/react-native/scripts/find-node.sh

5

in my case, just run rm -rf ./Pods && pod install, and then build your app npx react-native run-ios

3

I think your problem come from this line.

The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99.

This warning means that you are trying to deploy on a version that is not supported by Xcode anymore.

Your react native package seems to not be up to date because it init your project with the wrong target.

Use 'npx react-native init ProjectName' to fix this problem. This command will execute react-native with the latest version online.

You can fix your project target by using this command from this post.

When you run react-native run-ios, react-native will try to deploy with the target in his config file, but on Xcode the problem is bypassed by the config in Xcode.

docmurloc
  • 1,201
  • 4
  • 11
3

If you use nvm make sure that you don't have separate node installed globally.

Check this answer for more https://stackoverflow.com/a/67035460/6653922

Bogdan
  • 31
  • 4
3

I was facing same issue. My project name did not had any spaces but my root folder name had spaces. So please make sure that any folder name from root and project should not contain any spaces. This solution worked for me. I using M1 pro chip and opened everything in Rosetta.

kunal.c
  • 2,739
  • 1
  • 18
  • 24
2
  1. Build Settings -> Build Active Architecture Only -> Debug -> Yes
  2. Add "arm64" in "Excluded Architectures" in build settings of both project and pods project, to run the app in simulator. Remove it while making build on device or archiving the app.
Shivani Bajaj
  • 996
  • 10
  • 23
2

If you do want to keep with nvm, you can comment the code from node-modules/react-native/scripts/find-node.sh related to search the node version and add after it like:

export PATH="/Users/myMacUser/.nvm/versions/node/v16.13.0/bin/:$PATH"

in my case i commented these lines:

# # Support Homebrew on M1
# HOMEBREW_M1_BIN=/opt/homebrew/bin
# if [[ -d $HOMEBREW_M1_BIN && ! $PATH =~ $HOMEBREW_M1_BIN ]]; then
#   export PATH="$HOMEBREW_M1_BIN:$PATH"
# fi

# # Define NVM_DIR and source the nvm.sh setup script
# [ -z "$NVM_DIR" ] && export NVM_DIR="$HOME/.nvm"

# if [[ -s "$HOME/.nvm/nvm.sh" ]]; then
#   # shellcheck source=/dev/null
#   . "$HOME/.nvm/nvm.sh"
# elif [[ -x "$(command -v brew)" && -s "$(brew --prefix nvm)/nvm.sh" ]]; then
#   # shellcheck source=/dev/null
#   . "$(brew --prefix nvm)/nvm.sh"
# fi

on Xcode Build Phases I set statically the node version too on Bundle React Native code and images

set -e

export NODE_BINARY=/Users/myMacUser/.nvm/versions/node/v16.13.0/bin/node
../node_modules/react-native/scripts/react-native-xcode.sh

myMacUser is your user

v16.13.0 is the node version I am using, you can set the one you want.

1

For me I had installed node v16.x and I created the project using npx react-native init. npx takes the latest stable releases as mentioned in the comment below by @Ezekiel. So, since I was using yarn so I did react-native init PROJ_NAME and then it started working for me.

So I suggest you check which node you're using and check either your versioning of npm aligns with that or not. It's worth a try to uninstall node and do a fresh install. But this is NOT A RECOMMENDED WAY, and this was in my case. Hope it helps. Please check other answers before deleting anything.

Chaudhry Talha
  • 7,231
  • 11
  • 67
  • 116
  • 1
    just use `npx react-native` next time bro – Ezekiel Apr 02 '21 at 22:13
  • @Ezekiel yeah, now it only works with `npx`... why is that was there an update? Because now simple `react-native run-ios` doesn't work – Chaudhry Talha Apr 05 '21 at 01:57
  • Npx makes use of the latest stable release of react native or any other cli possible tool. The react native on your system might be different or outdated, and it will require that you manually update yours or make use of a scheduling script to check for you and update. – Ezekiel Apr 06 '21 at 10:07
1

I followed https://github.com/react-native-community/upgrade-support/issues/138#issuecomment-808895860

After two days of trying i found the solution in deleting spaces in the path where your project lives and run. But in order for this to work properly follow these steps:

  • If you previously installed a global react-native-cli package, please remove it as it may cause unexpected issues (i.e. npm uninstall -g react-native-cli)
  • Move the project folder in a path with no spaces (i.e. ~/sub folder name/ReactNativeApp won't work till you have spaces in the path, so move in a path like ~/folder/ReactNativeApp)
  • Then cd into the project folder and upgrade react native to the latest version with npx react-native upgrade and resolve conflicts if any
  • After upgrading remove the node_modules folder and the yarn.lock from the root and the podfile.lock and Pods folder from ios subfolder
  • Then cd back to the root and run yarn install && npx pod-install

Now run again your app in Xcode or your IDE and it works

Crazy and absurd that a space in the path-name could cause this issue

Thanks giuseppealbrizio!

I think my core fix came from running npx pod-install which update my Pod.lock checksum.


Versions:

  • React-Native: 0.64.2
  • iOS Emulator: 14.4
  • XCode: 12.5

On a brand new npx react-native init project

3ygun
  • 1,192
  • 12
  • 14
1

I have a lot of trouble trying to build an App, just to realize that my node installation isn't "normal". So, to make this work, I just linked the node to the usr/local/bin folder.

sudo ln -s $(which node) /usr/local/bin/node

Running on a Mac M1.

1

If you are using nvm with an intel based Mac ln -s $(which node) /usr/local/bin should take care of the issue.

jQN
  • 459
  • 6
  • 5
0

Add below line in a pod file 1) use_flipper!({ 'Flipper-Folly' => '2.5.3', 'Flipper' => '0.87.0', 'Flipper-RSocket' => '1.3.1' })

  1. delete pod folder and lock.

  2. pod install

  3. run the app from Xcode and later from vscode.

Sandeep Rajbhar
  • 93
  • 1
  • 10
0

For Final Run Mac 1 Silicon 0.65 (any version)

Npx react-native init newproject

Then change the pod file

Go to

Cd iOS

Open pod file

Add

platform :ios, '12.1'


  use_flipper!()
  post_install do |installer|
    react_native_post_install(installer)
        installer.pods_project.build_configurations.each do |config| config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] =  "arm64"
        end
  end

Pod File

And bridge header by adding the new swift file and after addition of bridge header please delete the swift file otherwise swift file may generate error.

For Creating the Swift File.

Go to project nitin2 -> Nitin2 (sub project) and right click on it Click New File Select swift file -> next Then select the nitin2 directory in the iOS folder Leave the file name same Click checkbox nitin2 in the target Click create Now the it will ask to create the bridging header.h Yes create the file And now go to

Go to project nitin2 -> Nitin2 (sub project) See the file.swift and delete it.

Now go to Xcode -> target Nitin2 -> build setting In ARCHITECTURES CLICK EXCLUDED ARCHITECTURES AND ADD THE arm64

Xcode

Now Remove the build folder from Xcode product menu

Now do the things through terminal

Cd go to iOS directory

pod cache clean --all  

yarn cache clean  

rm -rf ~/Library/Developer/Xcode/DerivedData/*

open nitin2.xcworkspace

rm -rf Pods Podfile.lock 


pod deintegrate && pod setup && pod install

code /Users/nitin/D1/www/projects/nitin2/ios/Pods/../../node_modules/react-native/React/FBReactNativeSpec/../../scripts/generate-specs.sh

Add export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin

Then run the iOS

npx react-native run-ios 
Gh05d
  • 7,923
  • 7
  • 33
  • 64
  • 1
    Hey Nitin, can you please format your answer so that the explanation and the code are quite evident. – m4n0 Sep 08 '21 at 11:39
  • Please provide additional details in your answer. As it's currently written, it's hard to understand your solution. – Community Sep 08 '21 at 14:14
0

Copy all the script in xcode print and debug it in your shell. Using set -x to debug in shell. Normally you will find the actual bug.

PhasescriptExecution: strong text if ~/.nvmrc exists, but nvm is not a cmd in you shell.

ZK_
  • 494
  • 5
  • 14
0

Applying the commit that removes the find-node.sh script with patch-package fixed this issue for a dev on our team who was stuck with this issue.

The contents of our patch is simply

diff --git a/node_modules/react-native/scripts/find-node.sh b/node_modules/react-native/scripts/find-node.sh
deleted file mode 100755
index 5d6d2c4..0000000
--- a/node_modules/react-native/scripts/find-node.sh
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/bash
-# Copyright (c) Facebook, Inc. and its affiliates.
-#
-# This source code is licensed under the MIT license found in the
-# LICENSE file in the root directory of this source tree.
-
-set -e
-
-# remove global prefix if it's already set
-# the running shell process will choose a node binary and a global package directory breaks version managers
-unset PREFIX
-
-# Support Homebrew on M1
-HOMEBREW_M1_BIN=/opt/homebrew/bin
-if [[ -d $HOMEBREW_M1_BIN && ! $PATH =~ $HOMEBREW_M1_BIN ]]; then
-  export PATH="$HOMEBREW_M1_BIN:$PATH"
-fi
-
-# Define NVM_DIR and source the nvm.sh setup script
-[ -z "$NVM_DIR" ] && export NVM_DIR="$HOME/.nvm"
-
-# Source nvm with '--no-use' and then `nvm use` to respect .nvmrc
-# See: https://github.com/nvm-sh/nvm/issues/2053
-if [[ -s "$HOME/.nvm/nvm.sh" ]]; then
-  # shellcheck source=/dev/null
-  . "$HOME/.nvm/nvm.sh" --no-use
-  nvm use 2> /dev/null || nvm use default
-elif [[ -x "$(command -v brew)" && -s "$(brew --prefix nvm)/nvm.sh" ]]; then
-  # shellcheck source=/dev/null
-  . "$(brew --prefix nvm)/nvm.sh" --no-use
-  nvm use 2> /dev/null || nvm use default
-fi
-
-# Set up the nodenv node version manager if present
-if [[ -x "$HOME/.nodenv/bin/nodenv" ]]; then
-  eval "$("$HOME/.nodenv/bin/nodenv" init -)"
-elif [[ -x "$(command -v brew)" && -x "$(brew --prefix nodenv)/bin/nodenv" ]]; then
-  eval "$("$(brew --prefix nodenv)/bin/nodenv" init -)"
-fi
-
-# Set up the ndenv of anyenv if preset
-if [[ ! -x node && -d ${HOME}/.anyenv/bin ]]; then
-  export PATH=${HOME}/.anyenv/bin:${PATH}
-  if [[ "$(anyenv envs | grep -c ndenv )" -eq 1 ]]; then
-    eval "$(anyenv init -)"
-  fi
-fi
-
-# Set up asdf-vm if present
-if [[ -f "$HOME/.asdf/asdf.sh" ]]; then
-  # shellcheck source=/dev/null
-  . "$HOME/.asdf/asdf.sh"
-elif [[ -x "$(command -v brew)" && -f "$(brew --prefix asdf)/asdf.sh" ]]; then
-  # shellcheck source=/dev/null
-  . "$(brew --prefix asdf)/asdf.sh"
-fi
diff --git a/node_modules/react-native/scripts/react-native-xcode.sh b/node_modules/react-native/scripts/react-native-xcode.sh
index 3ef9a71..304a5dc 100755
--- a/node_modules/react-native/scripts/react-native-xcode.sh
+++ b/node_modules/react-native/scripts/react-native-xcode.sh
@@ -79,9 +79,7 @@ if [[ $DEV != true && ! -f "$ENTRY_FILE" ]]; then
   exit 2
 fi
 
-# Find path to Node
-# shellcheck source=/dev/null
-source "$REACT_NATIVE_DIR/scripts/find-node.sh"
+NODE_BINARY="$(command -v node)"
 
 # check and assign NODE_BINARY env
 # shellcheck source=/dev/null
diff --git a/node_modules/react-native/scripts/react_native_pods.rb b/node_modules/react-native/scripts/react_native_pods.rb
index 1b8a078..d65c9ca 100644
--- a/node_modules/react-native/scripts/react_native_pods.rb
+++ b/node_modules/react-native/scripts/react_native_pods.rb
@@ -289,8 +289,6 @@ else
 fi
 
 find_node () {
-  source "$RN_DIR/scripts/find-node.sh"
-
   NODE_BINARY="${NODE_BINARY:-$(command -v node || true)}"
   if [ -z "$NODE_BINARY" ]; then
     echo "error: Could not find node. Make sure it is in bash PATH or set the NODE_BINARY environment variable." >> "${SCRIPT_OUTPUT_FILE_0}" 2>&1
Taylor Kline
  • 908
  • 3
  • 9
  • 30
  • A link to a solution is welcome, but please ensure your answer is useful without it: [add context around the link](//meta.stackexchange.com/a/8259) so your fellow users will have some idea what it is and why it is there, then quote the most relevant part of the page you are linking to in case the target page is unavailable. [Answers that are little more than a link may be deleted.](/help/deleted-answers) –  May 27 '22 at 15:49
  • 1
    You were too fast, haha, I just barely posted it. I'm adding more information to it as we speak. – Taylor Kline May 27 '22 at 15:50
0

For me I had the project inside a folder named "React-Native Projects". When I changed the folder name to "ReactProjects" and deleted the derived data folder. And cleaned the project and build , it didn't showed me any errors. I think If you have used ' React-Native ' in naming for any folder in the hierarchy, change it.

SABYASACHI
  • 34
  • 3
0

The issue isn't with any other library, but with react native itself. For me and RN 0.64/Apple M1, running react-native run-iosthrew the PhaseScriptExecution error.

However, running npx react-native run-ios works as intended.

Mike S.
  • 2,048
  • 1
  • 32
  • 55
0

Steps I did and worked for me:

before start uninstall every node related file.

1- Run terminal using Rosetta

reference: https://osxdaily.com/2020/11/18/how-run-homebrew-x86-terminal-apple-silicon-mac/

2- Set Bash as the default terminal:

chsh -s /bin/bash

3- install Homebrew

from: Homebrew

4- install node

brew install node

5- install watchman

brew install watchman

6- install ruby

brew install ruby

7- install cocoapod & ffi

sudo gem install -n /usr/local/bin ffi cocoapods
Azahrani
  • 1
  • 1
0

node_modules/react-native/React-Native/scripts/generate-specs.sh

Add this line at top export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin

and then run the project, hopefully it will be working fine

0

Open node_modules/react-native/scripts/find-node.sh and remove the following lines.

# Support Homebrew on M1
HOMEBREW_M1_BIN=/opt/homebrew/bin
if [[ -d $HOMEBREW_M1_BIN && ! $PATH =~ $HOMEBREW_M1_BIN ]]; then
  export PATH="$HOMEBREW_M1_BIN:$PATH"
fi

Run npx react-native run-ios

This is a temporary solution. I have tried all the suggestions to resolve this problem on my M1 mac. But nothing helped so far.

0

After so many days of my research, I found some solutions,

Just check each step.

  1. Remove white spaces in folder name : -Which means none of the folders should contain white space in the folder name.

  2. Check your version of node: in case my node version v16.17.1 works good. Reinstall if the version is different.

  3. Then do, cd ios && rm -rf ./Pods && pod install

  4. Then use arch -x86_64 npx react-native run-ios --simulator "iPhone 14" : iPhone 14 can be any simulator which you have installed in your machine (Only if you have simulator)

NB: Try running the build after each step. Also try to build it using the XCode

Any queries are appreciated.

user7418129
  • 1,074
  • 14
  • 18
0

In my case this I was getting the error on a CI machine where npm ci was being run.

In react-native 0.70.x there is a devDependency that is used in the generate-specs script called yargs.

Since this is missing on npm ci the script and build will fail.

I resolved this by installing yargs in my project. It seems this might be resolved in react-native: 0.71.x versions.

I made a GitHub issue here.

cjhines
  • 1,148
  • 3
  • 16
  • 32
0

Did happen while upgrading Node.js version from 14 to 16.

Changing export NODE_BINARY="/usr/local/bin/node" to export NODE_BINARY="/opt/homebrew/bin/node" in ios/.xcode.env.local fixed the problem.

which node returns the path which will work for you.

Daniel Danielecki
  • 8,508
  • 6
  • 68
  • 94
0

I had this exact error on CircleCI, and maybe it was a specific setup, but it may give some other hints:

It turned out I used yarn to call my run script:

yarn mybuildcommand

calling xcodebuild under the scene, and Failed.

Now I switched to using npm to call my run-script:

npm run mybuildcommand

and xcodebuild finish with success.

Chris
  • 1,016
  • 1
  • 14
  • 18
0

I solved the problem by creating a link to the node

mkdir -p /usr/local/bin

ln -s $(which node) /usr/local/bin/node

echo "export PATH=/usr/local/bin:$PATH" >> ~/`[[ $SHELL == *"zsh" ]] && echo '.zshrc' || echo '.bash_profile'`
0

None of the above solutions worked for me... The solution worked for me :---->

There was an environment variable set in my .xcode.env.local file (in the ios folder) which was getting accessed for node. Whereas I installed my node using homebrew whose updated path was -

Wrong - export NODE_BINARY="/usr/local/bin/node" New - export NODE_BINARY="/opt/homebrew/Cellar/node@16/16.20.1_1/bin/node"

To solve this --> either delete this file coz cli have a global xcode.env file which will know where to pick up the node and eventually that file will fix and re-create the correct NODE_BINARY path in .xcode.env.local

or set it manually.

Thanks! Happy Coding.

sam_urai
  • 76
  • 4
-1

I was installing TheCodingMachine React Native boilerplate 3.2.5 link and I got a similar error.

Decision. Updated the React Native version

//react-native": "0.66.4" ->  "react-native": "0.67.3"

cd ios && rm -rf Pods && pod install

And an nvm update can also help.

Renderlife
  • 50
  • 4