NPM-安装报错connect ETIMEDOUT
-
- 解决方案
- [常用NPM YARN操作](#常用NPM YARN操作)
解决方案
- 报错信息request to https://registry.npm.taobao.org/yarn failed, reason: connect ETIMEDOUT
java
1、npm set strict-ssl false
2、设置代理
npm config set proxy http://xxx:xxx@openproxy.ali.com:8080
- yarn install报错'vue-cli-service' 不是内部或外部命令,也不是可运行的程序
java
yarn config set strict-ssl false
yarn install
常用NPM YARN操作
- npm如何在安装的时候指定源
npm install -g yarn@1.22.19 --registry=https://registry.npm.taobao.org
- 如何查看设置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