首页 > 解决方案 > CocoaPods 找不到 pod "ReactCommon/callinvoker" 的兼容版本

问题描述

我已经采取了几个步骤来解决这个问题,包括删除node_modules、删除pod.lock、运行yarn cache clean、运行npx react-native-clean-project、运行pod install --repo-update......但到目前为止没有任何效果。这是针对 Expo 裸工作流项目的。

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

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

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.

标签: iosreact-nativecocoapodsexpo

解决方案


podfile在ios文件夹中打开

并更换

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

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

推荐阅读