npm和yarn相关设置

镜像站

查询当前镜像

npm get registry  # npm
yarn config get registry  # yarn

修改镜像站

npm config set registry https://registry.npmmirror.com  # npm
yarn config set registry https://registry.npmmirror.com  # yarn

代理

查询代理

# npm
npm get proxy
npm get https-proxy

# yarn
yarn config get proxy
yarn config get https-proxy

修改代理

# npm
npm set proxy http://[ip]:[port]
npm set https-proxy http://[ip]:[port]

# yarn
yarn config set proxy http://[ip]:[port]
yarn config set https-proxy http://[ip]:[port]

删除代理

# npm
npm delete proxy
npm delete https-proxy

# yarn
yarn config delete proxy
yarn config delete https-proxy
posted @   ももねこ  阅读(42)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示