将 react-native 升级到最新版本 0.61.4 后找不到以下原生模块 [英] Could not find the following native modules after upgrading the react-native to latest version 0.61.4
问题描述
升级 react-native 版本后,我得到以下信息.并且无法在模拟器中运行构建
After upgrading the react-native version I am getting the following. And failed to run the build in simulator
在此之后,我运行了 react-native run-ios 它显示我所有的包都是手动链接的,您需要取消所有包的链接.
After this, I have run react-native run-ios it shows all my packages are manually linked and you need to unlink all packages.
此外,在更新到最新的 react-native 后,任何人都可以澄清 react-native-config.js 文件是必需的.
Also, can anyone clarify the react-native-config.js file is mandatory for this after updating to the latest react-native.
我总是打开 app.Xcodeproj 但下面显示我需要打开 app.xcworkspace.谁能澄清一下?
Always I open the app.Xcodeproj but the below shows I need to open app.xcworkspace. Can anyone clarify this?
warn The following packages use deprecated "rnpm" config that will stop working from next release:
- react-native-fetch-blob: https://github.com/wkh237/react-native-fetch-blob#readme
- react-native-orientation: https://github.com/yamill/react-native-orientation#readme
- rn-fetch-blob: https://github.com/joltup/rn-fetch-blob#readme
Please notify their maintainers about it. You can find more details at https://github.com/react-native-community/cli/blob/master/docs/configuration.md#migration-guide.
error Could not find the following native modules: BugsnagReactNative, react-native-camera, react-native-cookies, react-native-fast-image, react-native-fetch-blob, RNFS, RNGestureHandler, RNImageCropPicker, react-native-image-picker, RNImageRotate, BVLinearGradient, react-native-orientation, RNShare, RNSVG, RNVectorIcons, RNViewShot, react-native-webview, rn-fetch-blob. Did you forget to run "pod install" ?
info Found Xcode workspace "Fashion.xcworkspace"
推荐答案
这应该可以解决您的问题.
This should fix your issue.
rm -rf ios/Pods && rm -rf ios/build && cd ios && pod install && cd ../
rm -rf node_modules && rm yarn.lock && yarn install
PS:在 react-native 0.60 及以上版本中,原生模块现在是自动链接的.查看更多文档:https://facebook.github.io/react-native/blog/2019/07/03/version-60#native-modules-are-now-autolinked
PS: In react-native version 0.60 and above, native modules are now auto-linked. See the docs for more: https://facebook.github.io/react-native/blog/2019/07/03/version-60#native-modules-are-now-autolinked
这篇关于将 react-native 升级到最新版本 0.61.4 后找不到以下原生模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!