Why won't this work?? I'd appreciate any help...
I started my React Native project by using the commands
npx react-native init ProjectName
npx react-native start
npx react-native run-ios
I would think this should work out of the box since I haven't changed anything in the boilerplate but I run into this error (just the tail of the logs since it is very long):
CompileC /Users/kenjohnson/Library/Developer/Xcode/DerivedData/musu-dxuzhjabsbtpkngvripniybslkco/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/x86_64/TurboModuleBinding.o /Users/kenjohnson/Documents/Projects/Personal/musu/node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'ReactCommon' from project 'Pods')
cd /Users/kenjohnson/Documents/Projects/Personal/musu/ios/Pods
export LANG\=en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -target x86_64-apple-ios10.0-simulator -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -std\=c++14 -stdlib\=libc++ -fmodules -fmodules-cache-path\=/Users/kenjohnson/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/kenjohnson/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 -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror\=return-type -Wdocumentation -Wunreachable-code -Werror\=deprecated-objc-isa-usage -Werror\=objc-root-class -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -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-c++11-extensions -DPOD_CONFIGURATION_DEBUG\=1 -DDEBUG\=1 -DCOCOAPODS\=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk -fasm-blocks -fstrict-aliasing -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 -index-store-path /Users/kenjohnson/Library/Developer/Xcode/DerivedData/musu-dxuzhjabsbtpkngvripniybslkco/Index/DataStore -iquote /Users/kenjohnson/Library/Developer/Xcode/DerivedData/musu-dxuzhjabsbtpkngvripniybslkco/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/ReactCommon-generated-files.hmap -I/Users/kenjohnson/Library/Developer/Xcode/DerivedData/musu-dxuzhjabsbtpkngvripniybslkco/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/ReactCommon-own-target-headers.hmap -I/Users/kenjohnson/Library/Developer/Xcode/DerivedData/musu-dxuzhjabsbtpkngvripniybslkco/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/ReactCommon-all-non-framework-target-headers.hmap -ivfsoverlay /Users/kenjohnson/Library/Developer/Xcode/DerivedData/musu-dxuzhjabsbtpkngvripniybslkco/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/all-product-headers.yaml -iquote /Users/kenjohnson/Library/Developer/Xcode/DerivedData/musu-dxuzhjabsbtpkngvripniybslkco/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/ReactCommon-project-headers.hmap -I/Users/kenjohnson/Library/Developer/Xcode/DerivedData/musu-dxuzhjabsbtpkngvripniybslkco/Build/Products/Debug-iphonesimulator/ReactCommon/include -I/Users/kenjohnson/Documents/Projects/Personal/musu/ios/Pods/Headers/Private -I/Users/kenjohnson/Documents/Projects/Personal/musu/ios/Pods/Headers/Private/ReactCommon -I/Users/kenjohnson/Documents/Projects/Personal/musu/ios/Pods/Headers/Public -I/Users/kenjohnson/Documents/Projects/Personal/musu/ios/Pods/Headers/Public/DoubleConversion -I/Users/kenjohnson/Documents/Projects/Personal/musu/ios/Pods/Headers/Public/RCT-Folly -I/Users/kenjohnson/Documents/Projects/Personal/musu/ios/Pods/Headers/Public/React-Core -I/Users/kenjohnson/Documents/Projects/Personal/musu/ios/Pods/Headers/Public/React-callinvoker -I/Users/kenjohnson/Documents/Projects/Personal/musu/ios/Pods/Headers/Public/React-cxxreact -I/Users/kenjohnson/Documents/Projects/Personal/musu/ios/Pods/Headers/Public/React-jsi -I/Users/kenjohnson/Documents/Projects/Personal/musu/ios/Pods/Headers/Public/React-jsiexecutor -I/Users/kenjohnson/Documents/Projects/Personal/musu/ios/Pods/Headers/Public/React-jsinspector -I/Users/kenjohnson/Documents/Projects/Personal/musu/ios/Pods/Headers/Public/React-perflogger -I/Users/kenjohnson/Documents/Projects/Personal/musu/ios/Pods/Headers/Public/React-runtimeexecutor -I/Users/kenjohnson/Documents/Projects/Personal/musu/ios/Pods/Headers/Public/ReactCommon -I/Users/kenjohnson/Documents/Projects/Personal/musu/ios/Pods/Headers/Public/Yoga -I/Users/kenjohnson/Documents/Projects/Personal/musu/ios/Pods/Headers/Public/glog -I/Users/kenjohnson/Documents/Projects/Personal/musu/ios/Pods/boost-for-react-native -I/Users/kenjohnson/Documents/Projects/Personal/musu/ios/Pods/RCT-Folly -I/Users/kenjohnson/Documents/Projects/Personal/musu/ios/Pods/DoubleConversion -I/Users/kenjohnson/Documents/Projects/Personal/musu/ios/Pods/Headers/Private/React-Core -I/Users/kenjohnson/Library/Developer/Xcode/DerivedData/musu-dxuzhjabsbtpkngvripniybslkco/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/DerivedSources-normal/x86_64 -I/Users/kenjohnson/Library/Developer/Xcode/DerivedData/musu-dxuzhjabsbtpkngvripniybslkco/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/DerivedSources/x86_64 -I/Users/kenjohnson/Library/Developer/Xcode/DerivedData/musu-dxuzhjabsbtpkngvripniybslkco/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/DerivedSources -F/Users/kenjohnson/Library/Developer/Xcode/DerivedData/musu-dxuzhjabsbtpkngvripniybslkco/Build/Products/Debug-iphonesimulator/ReactCommon -fmodule-map-file\=/Users/kenjohnson/Library/Developer/Xcode/DerivedData/musu-dxuzhjabsbtpkngvripniybslkco/Build/Products/Debug-iphonesimulator/YogaKit/YogaKit.modulemap -fmodule-map-file\=/Users/kenjohnson/Documents/Projects/Personal/musu/ios/Pods/Headers/Public/FlipperKit/FlipperKit.modulemap -fmodule-map-file\=/Users/kenjohnson/Documents/Projects/Personal/musu/ios/Pods/Headers/Public/React/React-Core.modulemap -fmodule-map-file\=/Users/kenjohnson/Documents/Projects/Personal/musu/ios/Pods/Headers/Public/yoga/Yoga.modulemap -fmodule-map-file\=/Users/kenjohnson/Documents/Projects/Personal/musu/ios/Pods/Headers/Public/React/React-Core.modulemap -fmodule-map-file\=/Users/kenjohnson/Documents/Projects/Personal/musu/ios/Pods/Headers/Public/yoga/Yoga.modulemap -DFOLLY_NO_CONFIG -DFOLLY_MOBILE\=1 -DFOLLY_USE_LIBCPP\=1 -Wno-comma -Wno-shorten-64-to-32 -Wno-documentation -include /Users/kenjohnson/Documents/Projects/Personal/musu/ios/Pods/Target\ Support\ Files/ReactCommon/ReactCommon-prefix.pch -MMD -MT dependencies -MF /Users/kenjohnson/Library/Developer/Xcode/DerivedData/musu-dxuzhjabsbtpkngvripniybslkco/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/x86_64/TurboModuleBinding.d --serialize-diagnostics /Users/kenjohnson/Library/Developer/Xcode/DerivedData/musu-dxuzhjabsbtpkngvripniybslkco/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/x86_64/TurboModuleBinding.dia -c /Users/kenjohnson/Documents/Projects/Personal/musu/node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.cpp -o /Users/kenjohnson/Library/Developer/Xcode/DerivedData/musu-dxuzhjabsbtpkngvripniybslkco/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/x86_64/TurboModuleBinding.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 'boost-for-react-native' 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: 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 5.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'CocoaAsyncSocket' 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')
** BUILD FAILED **
The following build commands failed:
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
CompileSwift normal x86_64 /Users/kenjohnson/Documents/Projects/Personal/musu/ios/Pods/YogaKit/YogaKit/Source/YGLayoutExtensions.swift
(2 failures)
info Run CLI with --verbose flag for more details.
I have googled this error and I have found some fixes/workarounds but I'm wondering: how can I fix this for good so I don't run into this issue every time I start a new project (eg is there something I need to update)?