react-native - 将 react-native 升级到最新版本 0.61.4 后找不到以下原生模块
问题描述
升级 react-native 版本后,我得到以下内容。并且未能在模拟器中运行构建
在此之后,我运行 react-native run-ios 它显示我的所有包都是手动链接的,您需要取消链接所有包。
此外,在更新到最新的 react-native 后,任何人都可以澄清 react-native-config.js 文件是强制性的。
我总是打开 app.Xcodeproj,但下面显示我需要打开 app.xcworkspace。任何人都可以澄清这一点吗?
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"
解决方案
这应该可以解决您的问题。
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
推荐阅读
- visual-studio-code - 如何使vscode资源管理器中的雪佛龙不显示?
- android - Android Paging 3:LoadType.APPEND 返回空远程键
- flutter - Flutter GetX:未捕获(承诺中)错误:断言失败:_isComplete 不正确
- c++ - 每种尺寸的最大过滤器的实现
- sql - 在另一个表中获取不属于某个类别的供应商
- ansible - 用于 virt commnd 状态检查的 ansible playbook
- java - Java:HashMap.getOrDefault 返回空值
- javascript - 其他函数调用函数不起作用
- apache-flink - Flink SQL 客户端:SELECT 'hello world' throws [ERROR] 无法执行 SQL 语句
- xml - 如何将属性连接在一起