cli icon indicating copy to clipboard operation
cli copied to clipboard

CocoaPods install error on RN 0.60.0 init

Open m2mathew opened this issue 7 years ago • 36 comments

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.

image

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

  1. Do not have CocoaPods or React-Native installed.
  2. Install a fresh copy of CocoaPods and its CLI.
  3. In your terminal, Install a fresh copy of React-Native version 0.60.0 using npm i -g react-native.
  4. Start a new RN project using react-native init MyProject.
  5. Evaluate the output in the terminal when the init process is installing the necessary pods that are needed for iOS development.

m2mathew avatar Jul 05 '19 14:07 m2mathew

I have same error when i run react-native init NewRN , I fix step is :

  1. add pod 'boost-for-react-native', :podspec => 'https://raw.githubusercontent.com/react-native-community/boost-for-react-native/master/boost-for-react-native.podspec' in Podfile
  2. pod install my Podfile like : image

How to fix it? @thymikee

GospelHW avatar Aug 27 '19 07:08 GospelHW

I don't know why you need boost-for-react-native, it's not necessary. Have you tried running pod install --repo-update?

thymikee avatar Aug 27 '19 07:08 thymikee

yes I tried but same error agin image

boost-for-react-native that is some people's method to solve this error, then this is right way for me, anyway i want to know why run react-native init have error in react-native 0.60.5

GospelHW avatar Aug 27 '19 08:08 GospelHW

@thymikee i means use boost-for-react-native can solved my error , but i don't know why. if it's not necessary.how to fix it ,can you help ?

GospelHW avatar Aug 28 '19 01:08 GospelHW

I think there's an issue with your local env. I haven't seen anybody else experiencing this.

thymikee avatar Aug 28 '19 04:08 thymikee

There was a strange issue with my local environment as well. See how I resolved it here: https://github.com/facebook/react-native/issues/25561#issuecomment-533850473

i-am-lioness avatar Sep 22 '19 05:09 i-am-lioness

update gem xcodeproj gem gem update xcodeproj

FernandoHT avatar Oct 15 '19 17:10 FernandoHT

I am getting this error. How to fix this

[!] CocoaPods could not find compatible versions for pod "react-native-webview": In Podfile: react-native-webview (from ../node_modules/react-native-webview)

Specs satisfying the react-native-webview (from ../node_modules/react-native-webview) dependency were found, but they required a higher minimum deployment target.

nihp avatar Nov 22 '19 12:11 nihp

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.

It worked, thanks 😃

jose-oscategui avatar Dec 08 '19 01:12 jose-oscategui

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.

Life saver this worked for me thanks a lot!!!!

arminhus avatar Feb 09 '20 01:02 arminhus

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.

Life saver this worked for me thanks a lot!!!!

Worked for me as well. Thanks much!!

dwaro avatar Feb 19 '20 07:02 dwaro

uninstall react-native worked for me

nut-nuttawat avatar Mar 04 '20 15:03 nut-nuttawat

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.

Solved my issue too . Thanks!~

grajuu avatar Mar 27 '20 10:03 grajuu

had the same error tired what @whenmoon suggested and everything works fine now

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.

thanks

tamakunay avatar Jun 09 '20 16:06 tamakunay

I have the same error as @whenmoon but my command line tools is already set to the version of Xcode I'm using (11.6)

Valegox avatar Aug 28 '20 20:08 Valegox

I have the same problem as @PastequeBuild too

moGeekHex avatar Sep 18 '20 01:09 moGeekHex