簡體   English   中英

npm install -g @ angular / cli命令未安裝angular cli

[英]npm install -g @angular/cli command does not install angular cli

我正在創建一個示例angular2 Web應用程序。 為此,我已經安裝了node.js(v 7.1.0)和NPM(v 3.10.9)。 現在在我執行命令時打開系統命令提示符后:NPM install -g @ angular / cli安裝angular cli我得到以下顯示的結果。 在執行ng -v檢查安裝的cli版本之后,我沒有得到版本號。

cli是否安裝不正確? 還是需要在環境var中設置任何路徑變量? 在這里必須做什么? 請指教。

C:\Users\27727>d:

D:\>cd learn-angular

D:\learn-angular>npm i -g @angular/cli
npm WARN gentlyRm not removing C:\Users\27727\AppData\Roaming\npm\ng.cmd as it w
asn't installed by C:\Users\27727\AppData\Roaming\npm\node_modules\@angular\cli
npm WARN gentlyRm not removing C:\Users\27727\AppData\Roaming\npm\ng as it wasn'
t installed by C:\Users\27727\AppData\Roaming\npm\node_modules\@angular\cli
C:\Users\27727\AppData\Roaming\npm\ng -> C:\Users\27727\AppData\Roaming\npm\node
_modules\@angular\cli\bin\ng
C:\Users\27727\AppData\Roaming\npm
`-- @angular/cli@1.7.0

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\@a
ngular\cli\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@
1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\@a
ngular\cli\node_modules\webpack-dev-server\node_modules\chokidar\node_modules\fs
events):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@
1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)
npm WARN ajv-keywords@3.1.0 requires a peer of ajv@^6.0.0 but none was installed
.

D:\learn-angular>ng -v
'ng' is not recognized as an internal or external command,
operable program or batch file.

D:\learn-angular>

在您的系統中,請檢查環境變量中是否存在此路徑( C:\\Program Files\\nodejs )。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM