react-native - 如何管理 CocoaPods 中的冲突版本?
问题描述
纽比在这里。
我在尝试从 Expo 中弹出 react 本机应用程序时遇到问题。
当我运行 pod install 时,我收到以下错误:
[!] CocoaPods could not find compatible versions for pod "Firebase/CoreOnly":
In Podfile:
EXFirebaseCore (from `../node_modules/expo-firebase-core/ios`) was resolved to 2.0.0, which depends on
Firebase/Core (= 6.14.0) was resolved to 6.14.0, which depends on
Firebase/CoreOnly (= 6.14.0)
RNFBApp (from `../node_modules/@react-native-firebase/app`) was resolved to 10.4.0, which depends on
Firebase/CoreOnly (~> 7.3.0)
本质上,我正在使用的一个模块(该模块的最新版本)与“Firebase/CoreOnly”的 6.14.0 版本有依赖关系
我正在使用的另一个模块依赖于“Firebase/CoreOnly”的7.3.0版本
如何“降级”第二个模块的依赖项,使其也指向版本 6.14.0?
或者失败了,有没有办法让项目可以并行使用两个不同的版本?
先感谢您!
解决方案
我遇到了同样的问题,我的解决方案是从我的项目中完全删除 expo-firebase 并使用 @react-native-firebase 完成所有工作。我认为不可能将@react-native-firebase 降级到 6.14.0