【发布时间】:2019-06-01 02:56:27
【问题描述】:
我使用的是节点 v10.16.0,但每次我尝试运行“ng new”或“ng -v”时都会收到一条错误消息,提示我正在运行 V6.11.3,并且我应该使用 10.9 或更高版本。
我尝试使用“npm cache clean”清理缓存。我试图卸载并重新安装 angular 和 node。我检查了系统变量并添加了路径。
C:\Users\Yv-Arnel\code>node -v
v10.16.0
C:\Users\Yv-Arnel\code>ng -v
You are running version v6.11.3 of Node.js, which is not supported by Angular CLI 8.0+.
The official Node.js version that is supported is 10.9 or greater.
Please visit https://nodejs.org/en/ to find instructions on how to update Node.js.
【问题讨论】:
-
在您拥有早期版本的 Node 时是否安装了 CLI?您是否再次尝试
npm install -g @angular/cli? -
这怎么可能
node -v v10.16.0但错误显示You are running version v6.11.3 of Node.js你安装了2 个node.js 吗? -
您使用的是 Windows。转到您的控制面板并卸载 NodeJS。从 PATH 环境变量中删除它,然后访问他们的网站并安装 LTS 版本。
-
您需要 node.js v12(不是 LTS)来运行 angular v8(最新)
标签: node.js angular npm angular-cli