npm install -g angular-cli 不起作用

npm install -g angular-cli doesnt work

更新:

好的,它已安全安装 "npm install -g angular-cli" 但现在我收到新错误:"You cannot use the new command inside an angular-cli project." 尝试做:"ng new ang2pro" 用于创建新项目。

C:\Users\armyTik\Desktop\angular2_projects>ng new pro-name
(node:6512) fs: re-evaluating native module sources is not supported. If you are using
 the graceful-fs module, please update it to a more recent version.
You cannot use the new command inside an angular-cli project.

原文post:

昨天它工作得很好,现在即使在重新安装 nodejs 后我仍然收到以下错误:

(cmd以管理员权限打开)

确保您的计算机上安装了 prerequisites

angular-cli needs Node 4 or above & Typings V1 or greater

node -v 应该大于 4

node typings -v 应该大于 1

否则使用 npm install typings -g

安装 typings

如果你在 mac 上,不要忘记命令前面的 sudo