Skip to content
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

fails to install CocoaPods deps #265

Open
JDMathew opened this issue Apr 13, 2022 · 9 comments
Open

fails to install CocoaPods deps #265

JDMathew opened this issue Apr 13, 2022 · 9 comments

Comments

@JDMathew
Copy link

Expected results

If I run npx react-native init example then CocoaPods dependencies are installed correctly but running npx react-native init example --template react-native-template-typescript fails on this step

Observed results

even after running cd ./example/ios && pod install this still fails

@JDMathew JDMathew changed the title fails to install cocoapods deps fails to install CocoaPods deps Apr 13, 2022
@Keffin
Copy link

Keffin commented Apr 24, 2022

I had a similar problem but solved it by uninstalling cocoapods, by running gem uninstall cocoapods followed by reinstalling cocoapods with Homebrew brew install cocoapods. Afterward just running pod install worked fine for me :)

@JDMathew
Copy link
Author

I had a similar problem but solved it by uninstalling cocoapods, by running gem uninstall cocoapods followed by reinstalling cocoapods with Homebrew brew install cocoapods. Afterward just running pod install worked fine for me :)

Strange because when I setup my mac I did run a gem uninstall cocoapods and installed it via brew so I shouldn't have lingering gem cocoapods issues but maybe it is the version. I will update cocoapods via brew and see if it fixes it.

@selbekk
Copy link

selbekk commented May 3, 2022

I noticed that you have to run npm install before you run cd ios && pod install. I also had to run bundle install for it to find cocoapods.

@kockok
Copy link

kockok commented Jun 24, 2022

I updated to react-native 0.69, when I try to start a new project, the following error raised:

✖ 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.

I am using cocoapods from homebrew

@radko93
Copy link
Collaborator

radko93 commented Jun 24, 2022

@kockok is this during react-native init command?

@kockok
Copy link

kockok commented Jun 24, 2022

@kockok is this during react-native init command?

Yes, this is not specific to the --typescript-template as I get this error even without specifying a template...

~/app: npx react-native init myApp                         
 
✔ 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 ./myApp/ios && pod install".
CocoaPods documentation: https://cocoapods.org/

@gorbypark
Copy link

I'm getting the same error (0.69) and doesn't seem to be related to cocoapods not being found (and not limited to this template). Doing a manual pod install in the iOS directory gives the more verbose error below . I get the same results when I drop the --template (so just npx react-native init my app) so it appears to be an issue with 0.69 and/or react-native-cli 8.0.x. pod install --repo-update in the ios directory makes everything work.

[!] CocoaPods could not find compatible versions for pod "Flipper-DoubleConversion":
  In Podfile:
    Flipper-DoubleConversion (= 3.2.0.1)

None of your spec sources contain a spec satisfying the dependency: `Flipper-DoubleConversion (= 3.2.0.1)`.

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

@Timson020
Copy link

I get same problem

In my other os, can work, but here is not work

how to do in it problem ?

@tomamatics
Copy link

Simply run pod repo update before creating the react-native app.
Cocoapods holds a list of all pods locally. By executing the command above you refresh that list.
works for me. 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants