当前位置:   article > 正文

NPM-安装报错connect ETIMEDOUT_npm connect etimedout

npm connect etimedout

NPM-安装报错connect ETIMEDOUT

解决方案

  1. 报错信息request to https://registry.npm.taobao.org/yarn failed, reason: connect ETIMEDOUT
1、npm set strict-ssl false
2、设置代理
npm config set proxy http://xxx:xxx@openproxy.ali.com:8080
  • 1
  • 2
  • 3
  1. yarn install报错’vue-cli-service’ 不是内部或外部命令,也不是可运行的程序,原因是没有执行install
 yarn config set strict-ssl false
 yarn install
  • 1
  • 2

常用NPM YARN操作

  1. npm如何在安装的时候指定源

npm install -g yarn@1.22.19 --registry=https://registry.npm.taobao.org

  1. 如何查看设置registry和proxy、配置

npm config get
查看和设置镜像
npm get registry
npm config set registry https://registry.npmjs.org/
npm config set ELECTRON_MIRROR “https://npm.taobao.org/mirrors/electron/”
npm config get ELECTRON_MIRROR
npm config delete ELECTRON_MIRROR
设置代理
npm config set proxy http://server:port
npm config set https-proxy http://server:port
查看代理
npm config get proxy
npm config get https-proxy
删除代理
npm config set proxy null
npm config set https-proxy null
yarn设置代理
yarn config set proxy http://xxx:xxx@openproxy.ali.com:8080
yarn删除代理
yarn config delete proxy

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小丑西瓜9/article/detail/141778
推荐阅读
  

闽ICP备14008679号