简体   繁体   English

npm install -g angular-cli不起作用

[英]npm install -g angular-cli doesnt work

Update: 更新:

Okay It seccussfully installed "npm install -g angular-cli" but now I got new error: "You cannot use the new command inside an angular-cli project." 好吧,它秘密地安装了“ npm install -g angular-cli”,但是现在我得到了新的错误:“您不能在angular-cli项目中使用新命令。” while trying to do: "ng new ang2pro" for making a new project. 同时尝试做:“ ng new 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.

Original post: 原始帖子:

It was working just fine yestarday and now I get the following errors even after reinstalling nodejs: 昨天晚上一切正常,现在即使重新安装了nodejs,我仍然遇到以下错误:

(The cmd is open with administrator privileges) (该cmd以管理员权限打开) 该cmd以管理员权限打开

Make sure you have prerequisites installed on your machine. 确保在计算机上安装了prerequisites

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

node -v should be greater than 4 node -v应该大于4

node typings -v should be greater than 1 node typings -v应该大于1

otherwise install typings using npm install typings -g 否则安装typings使用npm install typings -g

如果您使用的是Mac,请不要忘记命令前的sudo

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM