2016-07-07 143 views
0

更新:NPM安装-g角CLI不工作

还行吧seccussfully安装“故宫安装-g角(CLI)”,但现在我得到了新的错误:“您不能使用内部的角度,新的命令-cli项目“。同时试图做到:“ng新的ang2pro”用于制作一个新项目。

C:\Users\armyTik\Desktop\angular2_projects\1>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. 

原帖:

它工作得很好yestarday,现在我甚至重新安装的NodeJS后得到以下错误:

(cmd中是具有管理员权限打开) the cmd is open with administrator privileges

+0

是这个错误o仅在安装'angular-cli'软件包或所有软件包时才会出现。它清楚地表明你的'global'目录路径存在一些问题。 – Venky

+0

http://stackoverflow.com/questions/19874582/change-default-global-installation-directory-for-node-js-modules-in-windows – Venky

+0

我所做的唯一步骤就是创建一个空文件夹并在' npm install -g angular-cli'。 –

回答

0

确保你有prerequisites安装在你的机器上。

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

node -v应大于4

node typings -v应大于1

使用npm install typings -g

+0

我确实拥有所有这些,但仍然不是我得到相同的错误。 –

0

否则安装typings如果你是在Mac上,不要忘记在须藤命令前面