I'm on a Mac mini with Monterey OS trying to init a react-native app.
npx react-native init AwesomeProject
gives me:
✔ Downloading template
✔ Copying template
✔ 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 ./AwesomeProject/ios && pod install".
CocoaPods documentation: https://cocoapods.org/
when I try
cd ./AwesomeProject/ios && pod install
I get:
664 /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi/ffi.rb
665 /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi.rb
[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.
zsh: abort pod install
Is anyone else encountering the same problem?
EDIT:
Uninstalled and re-installed Ruby and Cocoapods.
and used:
arch -x86_64 pod install
CodePudding user response:
Using that processor does bring some issues with installing pods. Please try arch -x86_64 pod install
and see what it brings.
Link to some older post:
React Native ios builds failing suddenly