我尝试将react原生版本更新为最新版本,从0.59.8到0.60.3。但是,当我试图运行这个应用程序时,我得到了以下错误
warn The following packages use deprecated "rnpm" config that will stop working from next release:
- native-base: https://github.com/GeekyAnts/NativeBase#readme
- react-native-code-push: https://microsoft.github.io/code-push
- react-native-maps: https://github.com/react-native-community/react-native-maps#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.
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
error React Native CLI uses autolinking for native dependencies, but the following modules are linked manually:
- @react-native-community/async-storage (to unlink run: "react-native unlink @react-native-community/async-storage")
- react-native-code-push (to unlink run: "react-native unlink react-native-code-push")
- react-native-geolocation-service (to unlink run: "react-native unlink react-native-geolocation-service")
- react-native-gesture-handler (to unlink run: "react-native unlink react-native-gesture-handler")
- react-native-maps (to unlink run: "react-native unlink react-native-maps")
- react-native-vector-icons (to unlink run: "react-native unlink react-native-vector-icons")
This is likely happening when upgrading React Native from below 0.60 to 0.60 or above. Going forward, you can unlink this dependency via "react-native unlink <dependency>" and it will be included in your app automatically. If a library isn't compatible with autolinking, disregard this message and notify the library maintainers.
Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md在react本机运行-android终端中,错误如下所示
Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.1] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:7:5-117 to override.失败:生成失败,出现异常。
生成2s失败
at checkExecSyncError (child_process.js:616:11)
at execFileSync (child_process.js:634:13)我试图更新依赖项。断开依赖项并再次链接它们,没有任何帮助。
发布于 2019-07-15 16:27:57
从本机基础包中删除package.json中的rnpm。该文件位于/node_modules/native-base/package.json中
按照这个链接
https://github.com/GeekyAnts/NativeBase/pull/2749/commits/0bf3d4362116a17f9a4e311789a1a58dc6d98f37
发布于 2019-12-17 00:54:11
帮助下一个有这个问题的人。
运行下面的命令以删除带有“rnpm”的包:
纱线去除反应-本机更新-分级
在下面的命令之后更新依赖项:
纱升级
曾经工作过。
发布于 2020-01-07 15:21:58
删除node-modules并运行yarn
https://stackoverflow.com/questions/57038718
复制相似问题