2016-07-07 139 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上,不要忘記在須藤命令前面