【发布时间】:2018-05-06 08:38:03
【问题描述】:
我正在尝试在我的电脑中安装 angular 5。一切安装正确,但是当我使用“ng-serve”命令运行我的应用程序时,它显示以下错误。
You are running version v8.7.0 of Node.js, which is not supported by Angular CLI v6.
The official Node.js version that is supported is 8.9 and greater.
Please visit https://nodejs.org/en/ to find instructions on how to update Node.js.
node.js 的当前版本是“8.7.0”,npm 是“6.0.0”。
经过大量搜索后,我按照以下步骤在 Windows 10 上更新我的 node.js
npm cache clean -f
npm install -g n
n latest
但是我没有使用这个命令,它显示以下错误
C:\WINDOWS\system32>npm cache clean -f
npm WARN using --force I sure hope you know what you are doing.
C:\WINDOWS\system32>npm install -g n
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for n@2.1.8: wanted {"os":"!win32","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! notsup Valid OS: !win32
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: win32
npm ERR! notsup Actual Arch: x64
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\HP\AppData\Roaming\npm-cache\_logs\2018-05-06T07_36_10_847Z-debug.log
如何将 node.js 更新到最新版本才能运行我的 angular5 应用程序?
【问题讨论】:
标签: angular5