首页 > 解决方案 > 警告:这些软件包使用了已弃用的“rnpm”配置并且节点不工作

问题描述

我从github克隆了一个项目,使用yarn添加包并运行后,节点只显示警告:

以下软件包使用不推荐使用的“rnpm”配置,该配置将从下一个版本停止工作

节点立即关闭(在照片中)并立即关闭。

在此处输入图像描述

标签: react-nativenode-modules

解决方案


node模块立即关闭,可以运行yarn start或者npx start,会开启节点独立,可以看到报错。这就对了:

错误正则表达式无效:/(.\fixtures.|node_modules[]react[]dist[].|website\node_modules.|heapCapture\bundle.js|.\tests.)$/: 未终止的字符类。使用 --verbose 标志运行 CLI 以获取更多详细信息。SyntaxError: 无效的正则表达式:/(.\fixtures.|node_modules[]react[]dist[].|website\node_modules.|heapCapture\bundle.js|.\tests.)$/: 在新的 RegExp ( ) 在黑名单 (D:\projects\new_proj\node_modules\metro-config\src\defaults\blacklist.js:34:10) 在 getBlacklistRE (D:\projects\new_proj\node_modules\react-native\node_modules@react-native -community\cli\build\tools\loadMetroConfig.js:69:59) 在 getDefaultConfig (D:\projects\new_proj\node_modules\react-native\node_modules@react-native-community\cli\build\tools\loadMetroConfig.js :85:20) 在负载 (D:

此问题是由节点 v12.11.0 引起的。您可以在那里找到解决方案:

如何解决“react-native start”上的错误


推荐阅读