react-native - 警告:这些软件包使用了已弃用的“rnpm”配置并且节点不工作
问题描述
我从github克隆了一个项目,使用yarn添加包并运行后,节点只显示警告:
以下软件包使用不推荐使用的“rnpm”配置,该配置将从下一个版本停止工作
节点立即关闭(在照片中)并立即关闭。
解决方案
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 引起的。您可以在那里找到解决方案:
推荐阅读
- c++ - 从看似不相关的代码中改变 for 循环行为
- jquery - jQuery如何检查两个或多个选择下拉元素是否已更改
- javascript - 我想知道为什么事件侦听器不起作用?似乎它应该工作,但它不是
- ssl - 找不到 ngrok websocket 安全的证书
- php - (PHP) 带有授权标头的 file_get_contents
- django - 在 Django DetailView 中比较两个模型的值
- php - 如何通过 php 使用 Festival 文本到语音
- ms-access - Access 2016 如何使用变量的值而不是变量?
- ruby-on-rails - 未初始化的常量 ApplicationController (NameError)
- autodesk-model-derivative - Autodesk Forge 模型衍生 API:TranslationWorker-InternalFailure