中国加速镜像
- npm可能未及时同步
- pip可能未同步官方已经删除的恶意软件包
manager | useful commands | command |
---|---|---|
pnpm | pnpm get registry | pnpm config set registry https://registry.npmmirror.com |
npm | npm get registry | npm config set registry https://registry.npmmirror.com |
yarn | yarn config get registry | yarn config set registry https://registry.npmmirror.com |
pip | pip config list | # for pip install pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ # for pip search pip config set global.index https://mirrors.aliyun.com/pypi pip config set global.trusted-host mirrors.aliyun.com |
代理
注意如果你没有翻墙软件就不用做下面的配置,请将地址修改为你实际的代理地址。
npm(~/.npmrc)
1proxy=http://localhost:8118 2https_proxy=https://localhost:8118 3strict-ssl=false
yarn(~/.yarnrc)
1env: 2 proxy 'http://localhost:8118' 3 https_proxy 'https://localhost:8118' 4 strict-ssl false