Home > database >  React Native - CocoaPods could not find compatible versions for pod "FBReactNativeSpec"
React Native - CocoaPods could not find compatible versions for pod "FBReactNativeSpec"

Time:09-30

The react native version has been updated from 0.61.5 to 0.65.0.

After pod install I receive an error stating,

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

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

The path for FBReactNativeSpec in Podfile is,

pod 'FBReactNativeSpec', :path => "../node_modules/react-native/React/FBReactNativeSpec"

I cannot figure out how to resolve this.

CodePudding user response:

This could be an error with dependency, you may need to install react-native-codegen library like:

If you're using yarn packager:

yarn add --dev react-native-codegen

If you're using npm packager:

npm install react-native-codegen --force

And it will add the library in package.json

"dependencies": {
   "react-native-codegen": "^0.0.7"
}

Check this link out for more info.

Also, I'll recommend you to follow React Native Upgrade Helper document for Package.json and Podfile changes.

  • Related