首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >下面的软件包使用不推荐的"rnpm“配置,从下一个版本起停止工作

下面的软件包使用不推荐的"rnpm“配置,从下一个版本起停止工作
EN

Stack Overflow用户
提问于 2019-07-15 11:26:05
回答 3查看 10.2K关注 0票数 3

我尝试将react原生版本更新为最新版本,从0.59.8到0.60.3。但是,当我试图运行这个应用程序时,我得到了以下错误

代码语言:javascript
复制
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终端中,错误如下所示

代码语言:javascript
复制
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.

失败:生成失败,出现异常。

  • 哪里出了问题:任务执行失败':app:processDebugManifest‘。 清单合并失败:属性应用@appComponentFactory,来自com.android.Support:support:28.0.0 AndroidManifest.xml:22:18-91也存在于androidx.core:1.0.1AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).建议:在AndroidManifest.xml:7:5-117的元素中添加‘tools:replace=:appComponentFactory’来覆盖。
  • 尝试:使用--stacktrace选项运行以获得堆栈跟踪。使用--info或-调试选项运行以获得更多日志输出。用扫描来获得完整的洞察力。
  • https://help.gradle.org获得更多帮助

生成2s失败

代码语言:javascript
复制
at checkExecSyncError (child_process.js:616:11)
at execFileSync (child_process.js:634:13)

我试图更新依赖项。断开依赖项并再次链接它们,没有任何帮助。

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2019-07-15 16:27:57

从本机基础包中删除package.json中的rnpm。该文件位于/node_modules/native-base/package.json

按照这个链接

https://github.com/GeekyAnts/NativeBase/pull/2749/commits/0bf3d4362116a17f9a4e311789a1a58dc6d98f37

票数 4
EN

Stack Overflow用户

发布于 2019-12-17 00:54:11

帮助下一个有这个问题的人。

运行下面的命令以删除带有“rnpm”的包:

纱线去除反应-本机更新-分级

在下面的命令之后更新依赖项:

纱升级

曾经工作过。

票数 0
EN

Stack Overflow用户

发布于 2020-01-07 15:21:58

删除node-modules并运行yarn

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57038718

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档