问题描述
我已将 react-native 升级到 0.64,但在运行 pod install 后出现此错误.
I have upgrade react-native to 0.64 and I'm getting this error after I run pod install.
No podspec found for `FBReactNativeSpec` in `../node_modules/react-native/Libraries/FBReactNativeSpec`
我尝试删除 node_module、删除 pod 文件、解体,但仍然遇到此问题.
I have tried to remove the node_module, remove the pod file, deintegrate, but still got this issue.
有什么帮助吗?
推荐答案
较新版本的 ReactNative(从 0.64 开始)将 FBReactNativeSpec 存储在另一个文件夹中.您需要用 Pod 声明中的新路径替换旧的 FBReactNativeSpec 路径.
The newer version of ReactNative (starting from 0.64) store FBReactNativeSpec in another folder.You will need to replace the legacy FBReactNativeSpec path with the new one in the Pod declaration.
打开你的 Podfile 并找到这一行:
Open your Podfile and find this line :
pod 'FBReactNativeSpec', :path => "./node_modules/react-native/Libraries/FBReactNativeSpec"
并通过替换此路径来修复路径:
And fix the path by replacing with this one :
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/React/FBReactNativeSpec"
这篇关于在`../node_modules/react-native/Libraries/FBReactNativeSpec`中没有找到`FBReactNativeSpec`的podspec的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!