cli: CocoaPods install error on RN 0.60.0 init
Environment
System:
OS: macOS 10.14.5
CPU: (4) x64 Intel(R) Core(TM) i5-7600 CPU @ 3.50GHz
Memory: 22.14 GB / 40.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.16.0 - ~/.nvm/versions/node/v10.16.0/bin/node
Yarn: 1.16.0 - /usr/local/bin/yarn
npm: 6.9.0 - ~/.nvm/versions/node/v10.16.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
IDEs:
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.0 => 0.60.0
npmGlobalPackages:
react-native-cli: 2.0.1
Description
On this machine, this is my first time to install Xcode and CocoaPods followed by React-Native.
The first time I ever ran the react-native init
command, I realized that I didn’t have CocoaPods installed. I deleted the new directory created by init
, installed CocoaPods and its CLI, and re-ran react-native init
.
The install process seemed to be going fine, but after installing many pods, the process exited early with this message.
I was able to correct the issue by getting into the newly-created project’s ios
directory and running the following commands:
pod repo update
pod install
This is only a minor annoyance. After I completed the two above commands, I could successfully run the RN project in the iOS simulator. Nice startup UI now, everyone! 🎉
However, for new developers, this could be a roadblock to building applications.
Expected Behavior
I would expect that running react-native init
would set up all aspects needed to be able to start development immediately.
Reproducible Demo
- Do not have CocoaPods or React-Native installed.
- Install a fresh copy of CocoaPods and its CLI.
- In your terminal, Install a fresh copy of React-Native version 0.60.0 using
npm i -g react-native
. - Start a new RN project using
react-native init MyProject
. - Evaluate the output in the terminal when the
init
process is installing the necessary pods that are needed for iOS development.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 6
- Comments: 36 (11 by maintainers)
Commits related to this issue
- fix: run `pod repo update` after installing CocoaPods (#513) * fix: run `pod repo update` after installing CocoaPods (#487) Added `pod repo update` command call after CocoaPods installation to av... — committed to react-native-community/cli by simka 5 years ago
- Sync fork (#1) * chore: use @react-native-community/eslint-config (#205) Summary: --------- I changed @callstack/eslint-config to @react-native-community/eslint-config and fixed all lint issue... — committed to dratwas/react-native-cli by dratwas 5 years ago
- fix: run `pod repo update` after installing CocoaPods (#513) * fix: run `pod repo update` after installing CocoaPods (#487) Added `pod repo update` command call after CocoaPods installation to av... — committed to dratwas/react-native-cli by simka 5 years ago
Fixed with this - Open Xcode and go to Xcode → Preferences → Locations, and make sure the command line tools is set to the version of Xcode you’re using.
uninstall react-native worked for me
Solved my issue … Thanks 👍🏽
I’d like to claim this one, if nobody is working on it.
I removed CocoaPods gem and
~/.cocoapods
on my machine to see how completely fresh installation looks like and I’d addlogger
to CocoaPods installation step - previous step use it, this one doesn’t and it looks a bit jarring. I imagine I’d think something is broken seeing basically nothing happen for a while.As for the prompt after ~30s, I think it’s done for CocoaPods installation here, but I don’t see anything like that for
pod install
.Life saver this worked for me thanks a lot!!!
I don’t know why you need
boost-for-react-native
, it’s not necessary. Have you tried runningpod install --repo-update
?It worked, thanks 😃
I think there’s an issue with your local env. I haven’t seen anybody else experiencing this.
@thymikee Issue tested and fixed on newest CLI (2.7.1). Thanks!
What ever I try to fix in the Cocoapods installation, and even with updating the repo, when I use
react-native init
I get this error:I don’t even want to develop for iOS. Any ideas anyone?
This is without the v2.4.0
And this is with the v2.4.0, but I think the error is the same