CocoaPods could not find compatible versions for pod "ReactCommon/jscallinvoker":

React NativeCocoapods

React Native Problem Overview


I just updated to RN v0.62 and running app on iOS gives me following error

!] CocoaPods could not find compatible versions for pod "ReactCommon/jscallinvoker":
  In snapshot (Podfile.lock):
    ReactCommon/jscallinvoker (from `../node_modules/react-native/ReactCommon`)

  In Podfile:
    ReactCommon/jscallinvoker (from `../node_modules/react-native/ReactCommon`)

None of your spec sources contain a spec satisfying the dependency: `ReactCommon/jscallinvoker (from `../node_modules/react-native/ReactCommon`)`.

I deleted all node_modules and did npm i. I also did pod install in iOS directory but the issue persists. I also did pod repo update.

React Native Solutions


Solution 1 - React Native

For React native 0.62 version

So I figure it out

Replace following line in your Podfile

pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"

with

pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"

Edit:

If you have updated to React Native version 0.63

Delete Podfile.lock from iOS folder. Do npm i

Open podfile from iOS folder

Delete everything and copy below contents

require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
require_relative '../node_modules/react-native/scripts/react_native_pods'

platform :ios, '10.0'

target 'RNTodo' do
  config = use_native_modules!
  use_react_native!(:path => config["reactNativePath"])

  target 'RNTodoTests' do
    inherit! :complete
    # Pods for testing
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable these next few lines.
  use_flipper!
  post_install do |installer|
    flipper_post_install(installer)
  end
end

target 'RNTodo-tvOS' do
  # Pods for RNTodo-tvOS

  target 'RNTodo-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end
end

Replace RNTodo with your own project name, cd to iOS folder in the terminal and do pod install and everything should work

Also RN 0.63 has dropped support for iOS 9

Solution 2 - React Native

I solved this issue (version 0.63) by changing the line in the Podfile from

pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"

to

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

Solution 3 - React Native

I think jscallinvoker version is deprecated try to replacing

jscallinvoker 

to

callinvoker

Solution 4 - React Native

RN 0.63 has dropped support for iOS 9

So in pod file replace

  • platform :ios, '9.0'*
  • platform :ios, '10.0'*

and

  • pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
  • pod 'React-callinvoker', :path => "../node_modules/react-native/ReactCommon/callinvoker"

go to the ios folder in the terminal run

  • pod install
  • run react-native run-ios

Solution 5 - React Native

On Upgrade to React Native 0.63.0

This issue happens to my project after upgrading React Native to version 0.63.0 so for the solution I just remove the Podfile.lock and delete whole the Podfile and add the new content from a fresh install React Native project on the latest version and it means its content should be:

require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
require_relative '../node_modules/react-native/scripts/react_native_pods'

platform :ios, '10.0'

target '[YourProjectName]' do
  config = use_native_modules!
  use_react_native!(:path => config["reactNativePath"])

  target '[YourProjectName]Tests' do
    inherit! :complete
    # Pods for testing
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable these next few lines.
  use_flipper!
  post_install do |installer|
    flipper_post_install(installer)
  end
end

target '[YourProjectName]-tvOS' do
  # Pods for [YourProjectName]-tvOS

  target '[YourProjectName]-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end
end

Note: it is obvious you should replace your project name with [YourProjectName].

After it, run npx pod-install command on the root of your project and everything will back on track.

Solution 6 - React Native

In case anyone is still having issues with React Native Version 0.63.0 then this worked for me

Updating the callinvoker pod as follows

pod 'React-callinvoker', :path => "#{rnPrefix}/ReactCommon/callinvoker"

Solution 7 - React Native

In RN 0.63.0 you can remove all RN pods from you podfile and just include the following lines inside the target.

config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])

Also this line needs to be added after the platform line at the beginning of the podfile:

require_relative '../node_modules/react-native/scripts/react_native_pods'

After this, delete the Pods directory, Podfile.lock and the workspace file. Then just pod install.

Solution 8 - React Native

React-Native is now configuring pods dynamically, so you don't need to list each one anymore;

use_react_native!(:path => config["reactNativePath"])

This is what you get from a 63.1 base Podfile:

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '10.0'

target 'test' do
  config = use_native_modules!

  use_react_native!(:path => config["reactNativePath"])

  target 'testTests' do
    inherit! :complete
  end


  use_flipper!
  post_install do |installer|
    flipper_post_install(installer)
  end
end

target 'test-tvOS' do

  target 'test-tvOSTests' do
    inherit! :search_paths
  end
end

Solution 9 - React Native

Making manual adjustments according to https://react-native-community.github.io/upgrade-helper/?from=0.62.2&to=0.63.2 might help.

You will then have to run the command cd ios && pod install.

Solution 10 - React Native

platform :ios, '11.0'

I solved this issue (version 0.63.4) by changing as below

pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"

# Maybe someone is

pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"


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

Solution 11 - React Native

In case you already had callinvoker but you still have an error. This manipulation helped me :

 react-native start --reset-cache
 rm -rf node_modules/
 rm -rf package-lock.json 
 cd ios
 pod deintegrate
 cd ..
 rm -rf ios/Podfile.lock 
 npm install
 npm audit fix
 react-native link
 cd ios
 pod install
 cd ..
 react-native run-ios

Solution 12 - React Native

Faced this issue while upgrading Expo bare workflow 0.38 (RN 0.62) to 0.39 (has RN 0.63). Edited answer of @Pritish did work, But it says this error

[!] Unable to find a target named `RNTodo-tvOS` in project `RNTodo.xcodeproj`, did find `RNTodo`.

And

[!] Unable to find a target named `RNTodoTests` in project `RNTodo.xcodeproj`, did find `RNTodo`.

Got workaround by changing Podfile like below

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '10.0'

target 'daytodiary' do
  use_unimodules!
  config = use_native_modules!
  use_react_native!(:path => config["reactNativePath"])

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable these next few lines.
  

  use_flipper!
  post_install do |installer|
    flipper_post_install(installer)
  end
end

What changed?

ADD unimodules at top

require_relative '../node_modules/react-native-unimodules/cocoapods.rb'

ADD use_unimodules! before config = use_native_modules!.

REMOVE

target '[YourProjectName]Tests' do
    inherit! :complete
    # Pods for testing
  end

REMOVE

target 'RNTodo-tvOS' do
  # Pods for RNTodo-tvOS

  target 'RNTodo-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end
end

For Android (If you are getting errors after upgrading)

In android/build.gradle Change

ext {
        buildToolsVersion = "28.0.3"
        minSdkVersion = 21
        compileSdkVersion = 28
        targetSdkVersion = 28
    }

To

ext {
        buildToolsVersion = "29.0.2"
        minSdkVersion = 21
        compileSdkVersion = 29
        targetSdkVersion = 29
    }

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionPritishView Question on Stackoverflow
Solution 1 - React NativePritishView Answer on Stackoverflow
Solution 2 - React NativeMartino BonfiglioliView Answer on Stackoverflow
Solution 3 - React NativeAkshay IView Answer on Stackoverflow
Solution 4 - React NativeAhtsham ShoukatView Answer on Stackoverflow
Solution 5 - React NativeAmerllicAView Answer on Stackoverflow
Solution 6 - React NativeMohammed AtifView Answer on Stackoverflow
Solution 7 - React NativeTapaniView Answer on Stackoverflow
Solution 8 - React NativeShady AlzayatView Answer on Stackoverflow
Solution 9 - React NativemzuView Answer on Stackoverflow
Solution 10 - React NativeBinh HoView Answer on Stackoverflow
Solution 11 - React NativeJean-PaulView Answer on Stackoverflow
Solution 12 - React NativeltsharmaView Answer on Stackoverflow