javascript - 使用旧版本的节点创建 React App
问题描述
我正在尝试使用Create React App,但收到需要Node 10或更高版本的错误。我的节点版本是节点 8.10.0,我无法更新节点版本,因为它是一台工作机器。有什么方法可以运行旧版本的 Create React App 来使用我的旧 Node 版本?
解决方案
我设法运行它。支持Node 8.xx的软件包的最新版本似乎是3.4.1 forcreate-react-app
和3.1.1 for react-scripts
. 我做了什么:
npm uninstall -g create-react-app
npm install -g create-react-app@3.4.1
create-react-app my-app --scripts-version 3.1.1
但最好将您的 Node 版本更新为实际版本(或至少是 LTS)。
推荐阅读
- c# - 在 Sqlite 数据库 Unity 中保存为 4 位数字的系统日期
- php - 如何让我的界面只在一栏中发送多封邮件?
- javascript - Safari 的媒体记录 API 替代方案
- c++ - 为什么 lambda 在 clang 而不是 gcc 上崩溃?
- string - NodeMCU 数据类型 字符串大小
- java - 重试保存唯一表,直到在 jpa 中具有唯一值
- c++ - 锁定后我应该解锁 TBitmap 画布吗?
- ansible - 如何在ansible的同一语句中使用if elif和else jinja条件
- python - 添加两个列表的字符串并将其存储在新列表中
- c# - 在当前上下文中不存在。使用 [字符串]