环境配置
npm、yarn、pnpm 查看源和换源
# npmnpm config get registrynpm config set registry https://registry.npmmirror.com
# yarnyarn config get registryyarn config set registry https://registry.npmmirror.com
# pnpmpnpm config get registrypnpm config set registry https://registry.npmmirror.com
镜像源地址部分如下:
npm --- https://registry.npmjs.orgcnpm --- https://r.cnpmjs.orgtaobao --- https://registry.npmmirror.comnj --- https://registry.nodejitsu.comrednpm --- https://registry.mirror.cqupt.edu.cnnpmMirror --- https://skimdb.npmjs.com/registrydeunpm --- http://registry.enpmjs.org
View key
Mac: cat ~/.ssh/id_rsa.pub
Edit hosts
Mac: sudo vim /etc/hosts