Hi there, Im trying to configure my react native environment on my Macbook M1. When trying to create a new react native project from Cli returns:
creating
npx react-native init RnRQYPoc --template react-native-template-typescript
...
✔ 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 ./RnRQYPoc/ios && pod install".
CocoaPods documentation: https://cocoapods.org/
So, googling I found this issue: CocoaPods/CocoaPods#10287 (comment) and I already tried the two solutions:
Solution 1:
Duplicate the Terminal application in the Utilities folder.
Right click on the app and choose Get Info.
Rename the other version of the app as you like.
Check the option "open with Rosetta".
Install Cocoapods with the command "sudo gem install cocoapods"
Type the command line "sudo gem install ffi" to fix the ffi bundle problem. Now you can do a "pod install" without problem.
and
Solution 2:
sudo arch -x86_64 gem install ffi
arch -x86_64 pod install
But, both does not work returning the following errors:
Does anyone knows how can I fix this?
Fixed the installation of pod install doing the following: