【发布时间】:2018-11-10 05:43:41
【问题描述】:
当我尝试使用此命令安装 angular cli 时
npm install -g @angular/cli
我得到了下面提到的错误
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0
(node_modules\@angular\cli\node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for
fsevents@1.2.4: wanted {"os":"darwin","arch":"any"}
(current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.1.2 (node_modules\@angular\cli\node_modules\watchpack\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.1.2 (node_modules\@angular\cli\node_modules\webpack-dev-server\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none was installed.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-sass@4.9.0 (node_modules\@angular\cli\node_modules\node-sass):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-sass@4.9.0 postinstall: `node scripts/build.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
知道是什么问题吗?
我的node版本是6.9.2,npm版本是3.10.9
【问题讨论】:
-
将节点更新到 8.9 或更高版本。这是一个较新的要求。然后再试一次。
-
是的,它确实与节点版本有关,我卸载了节点并安装了
v8.11.1,它确实有效。谢谢@R.Richards
标签: node.js angular angular-cli