1

I have a macbook pro m1 and I am getting the above error when trying npx react-native init. I have followed the react native documentation for environment set up. I tried to install pod via brew, however, still the same error. What is the issue? I see a lot of people having the same issue, but there is no clear explanation or solution for it? Please help

✔ Processing template ✖ Installing CocoaPods dependencies (this may take a few minutes) ✖ Installing CocoaPods dependencies (this may take a few minutes) error Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template. Please try again manually: "cd ./test/ios && pod install". CocoaPods documentation: https://cocoapods.org/

[NOTE] You may have encountered a bug in the Ruby interpreter or extension libraries. Bug reports are welcome. For details: https://www.ruby-lang.org/bugreport.html

[IMPORTANT] Don't forget to include the Crash Report log file under DiagnosticReports directory in bug reports.

when I tried to run ios:

BUILD FAILED **

The following build commands failed: CompileC /Users/patrickbelan/Library/Developer/Xcode/DerivedData/test-gqoaknolitrwejedppjzybscmama/Build/Intermediates.noindex/test.build/Debug-iphonesimulator/test.build/Objects-normal/arm64/main.o /Users/patrickbelan/Desktop/react/test/ios/test/main.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'test' from project 'test') CompileC /Users/patrickbelan/Library/Developer/Xcode/DerivedData/test-gqoaknolitrwejedppjzybscmama/Build/Intermediates.noindex/test.build/Debug-iphonesimulator/test.build/Objects-normal/arm64/AppDelegate.o /Users/patrickbelan/Desktop/react/test/ios/test/AppDelegate.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'test' from project 'test') (2 failures)

Patrick89
  • 135
  • 1
  • 14
  • Please, provide more information about the issue you are facing. I mean **logs, errors, Podfile, etc.** – AndreyProgr Nov 30 '21 at 02:25
  • hi here is the more information. I tried to c/p the whole log from terminal but it is too big. it does not aloud me to post it. hopes this helps – Patrick89 Nov 30 '21 at 02:47

1 Answers1

0

Xcode Location window

How about trying to further ensure with Xcode that there is a valid command-line tool chosen. Go to Xcode Preferences » Location and selected Xcode version from the Command Line Tools select list if its blank.

And then run cd ./yourAppName/ios && pod install inside that app folder

SamiElk
  • 2,272
  • 7
  • 20