【问题标题】:when i install npm -g @angular/cli then get this error当我安装 npm -g @angular/cli 然后得到这个错误
【发布时间】:2017-12-10 04:56:24
【问题描述】:

节点-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

请大家帮帮我

【问题讨论】:

  • 请尝试设置HTTPS_PROXYnpm config set https-proxy
  • 如果您位于公司防火墙后面,请向您的网络管理员询问有关代理的信息。或者将网络切换到一个开放的无防火墙网络,这可能是您的加密狗或手机上的个人 n/w。然后试试

标签: angular installation


【解决方案1】:
 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

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

npm uninstall -g @angular/cli
npm cache clean

【讨论】:

    猜你喜欢
    • 2017-11-09
    • 1970-01-01
    • 2023-02-20
    • 2020-12-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-02-13
    • 2018-07-30
    相关资源
    最近更新 更多