Skip to content

npm 相关

设置npm镜像源操作

shell
#查看当前使用的镜像地址命令
npm config get registry

查看 当前镜像源

shell
#设置阿里镜像源(国内速度快)
npm config set registry http://registry.npmmirror.com
shell
#切回npm官方源
npm config set registry https://registry.npmjs.org

使用nvm控制node版本

  1. 安装nvm(地址https://github.com/nvm-sh/nvm)
      1. 下载脚本,然后bash运行
      1. 将nvm加入到环境变量