中国加速镜像
- 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)
INI
proxy=http://localhost:8118
https_proxy=https://localhost:8118
strict-ssl=false
- yarn(~/.yarnrc)
txt
env:
proxy 'http://localhost:8118'
https_proxy 'https://localhost:8118'
strict-ssl false