【问题标题】:Warning: The packages use deprecated "rnpm" config and node not working警告:这些软件包使用了已弃用的“rnpm”配置并且节点不工作
【发布时间】:2021-08-14 21:47:10
【问题描述】:

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

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

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

【问题讨论】:

    标签: react-native node-modules


    【解决方案1】:

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

    错误正则表达式无效:/(.\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:\projects\new_proj\node_modules\react-native\node_modules@react-native-community\cli\build\tools\loadMetroConfig.js:121:25) 在 Object.runServer [as func ] (D:\projects\new_proj\node_modules\react-native\node_modules@react-native-community\cli\build\commands\server\runServer.js:82:58) 在 Command.handleAction (D:\projects\new_proj \node_modules\react-native\node_modules@react-native-community\cli\build\cliEntry.js:160: 21) 在 Command.listener (D:\projects\new_proj\node_modules\commander\index.js:315:8) 在 Command.emit (events.js:210:5) 在 Command.parseArgs (D:\projects\new_proj \node_modules\commander\index.js:651:12)

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

    How to resolve the error on 'react-native start'

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-12-28
      • 1970-01-01
      • 2020-12-06
      • 2015-03-23
      • 2019-07-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多