当我安装npm -g @ angular / cli然后得到这个错误

时间:2017-12-10 04:56:25

标签: angular installation

  

node -v

     

v9.2.1

     

npm -v

     

5.5.1

     

npm install -g @angular cli

然后收到此错误.ESOCKETTIMEDOUT

提示:如果您所在的位置无法访问github.com      尝试通过HTTP_PROXY设置代理,例如

 export HTTP_PROXY=http://example.com:1234

或通过

配置npm代理
 npm config set proxy http://example.com:8080

任何人请帮帮我

1 个答案:

答案 0 :(得分:0)

XYZ

如果已安装,请将其卸载并重新安装,

 1) Install node.js and check and node -v in command prompt. (Node.js 
       through website).
2) npm install -g @angular/cli@latest (run in command prompt).
Refer this link for further help
https://github.com/angular/angular-cli

    3) Check node -version
    4) Check npm -version
    5) check ng -version