-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS pod install is failing on project init #30690
Comments
+1 ( on M1 Mac ) |
Anyone have any ideas for workarounds? Unless I am missing something, this is major; An up to date macOS/XCode environment cannot build a new project on either x86 or M1 arch 😞 |
im facing the same issue |
im facing the same issue |
install rosetta 2 cd /pathto_ios_folder/ |
I can't verify this because I do not have an M1 machine. If anyone has a working fix for x86 arch, that would be extremely useful. |
Running into this exact issue on an x86 MBP 2018. Looking for a workaround |
Has anyone managed to find a solution for this? With it now going on two weeks, I think I have to move on to another cross-platform framework. That's not meant to be hyperbolic, it's just bad timing for me as I can't tell my team that they have to go and find a Mac with an older OS just to get the project init working. I'm sorry to everyone that I cannot be of more help debugging this issue. |
I found a solution that worked for me: https://flaviocopes.com/react-native-fix-iphoneos-cannot-be-located/ |
@jvrenes the link you've shared is the same thing I already posted in the original question, they are saying to run: sudo xcode-select --switch /Applications/Xcode.app This did not fix the issue for me on either an x86 or M1 machine. |
@damienstanton any update on this error |
@hussainahmad unfortunately no, as I mentioned I ran into a time crunch and had to not use RN for that project for that reason. I haven't come back to test it in the meantime. I'm getting a new M1 machine this week and will give it a try again and see if I can reproduce the error. |
I just tested this on a fresh installed M1 Air, and there were no errors. I guess |
Uninstall cocoapods first first time will take time after that all template builds will be fast And also after this you can use the terminal of you choice if editors its a one time huccup but it works |
Interestingly I never needed to do anything with opening terminal in rosetta2. I really think it was just the dependency issue (flipper-glog being broken) in my case. I can no longer reproduce this issue so from my end it can be closed. |
I'm having the exact same issue today on an M1, your fix @damienstanton was just a re-init? |
I was able to fix this issue using below command. Give a try it should work Try: |
So you're saying line endings have to do with breaking the init process? I find that hard to believe since ppl on M1 machines say it's working out of the box. |
Run this and the pod install should run smoothly; M1 machine or not. |
It's important to note this was what I linked to in the original post - this did not fix my issue. In fact I opened this ticket initially because this command didn't fix the issue. I also said this again on Feb 1. Please read the thread carefully before posting the same thing over again, otherwise we just risk confusing people by saying the answer is something it is not. @jesper-bylund yes that is correct - I didn't do anything except go to other projects for a month. When I tried again on an M1 Macbook Air, it worked fine. Like I said in the OP, the error message was actually thrown from |
Facing same issue on MAC :
Anyone got around this issue on MAC? |
That worked for me, thanks. |
Happened with my machine as well. Had two version of xcode 12.4 and 12.5.1 the issue was that xcode-select was pointing to 12.5.1 |
same issue here, |
I had this issue after upgrading to XCode 13 on an M1 MB Air using RN The issue went away after upgrading to RN change
to
And fyi I'm not using Flipper but was seeing the same issue with pod install failing at |
brew install cocoapods
sudo arch -x86_64 gem install ffi
arch -x86_64 pod install Fixed for me |
i have two versions of XCode and this issue i encountered if i create a new project in Xcode 13 version and then |
Description
When running
npx react-native init <myproject>
, using any template, thepod install
phase fails on macOS 11.1 and XCode 12.3.Environment:
react-native info
, which is not a valid command.Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
npx react-native init myproject
cd
ing into the ios directory and runningpod install
produces additional logs, but still fails.Expected Results
The project should complete cocoapod install and work correctly.
Snack, code example, screenshot, or link to a repository:
Initial command error output (omitting ascii-art):
Manual
pod install
output:I can tell that the Flipper-glog dependency appears to be the point of failure, but I do not know how to troubleshoot that internal RN dependency properly. Possible relevant issues are #25561 and #30372. In one case, the recommended solution is to ensure that XCode.app is pointed to by the
xcode-select
tool.However, running
followed by
pod install
does not resolve this issue. I have also tried a couple of additional steps:sudo gem
and/or usingbrew install
This is a critical problem, as no new RN projects can currently be created in my environment.
The text was updated successfully, but these errors were encountered: