编码环境配置
powershell相关
设置代理
设置代理:
$env:HTTP_PROXY="http://127.0.0.1:7890"
$env:HTTPS_PROXY="https://127.0.0.1:7890"
删除代理:
$env:HTTP_PROXY=""
$env:HTTPS_PROXY=""
npm相关
安装npm
在Node.js中文网下载安装最新版本安装包并安装。
npm设置代理
设置代理:
npm config set proxy="http://127.0.0.1:7890"
npm config set https-proxy="http://127.0.0.1:7890"
删除代理:
npm config delete proxy
npm config delete https-proxy
npm设置源站(可选)
npm config set registry https://registry.npmmirror.com/
npm config set registry https://registry.npmjs.org/
yarn相关
安装yarn
npm install -g yarn
yarn设置代理
设置代理:
yarn config set proxy http://127.0.0.1:7890
yarn config set https-proxy http://127.0.0.1:7890
删除代理:
yarn config delete proxy
yarn config delete https-proxy
yarn设置源站(可选)
yarn config set registry https://registry.npmmirror.com/
yarn config set registry https://registry.npmjs.org/