下载包的镜像源,指的就是下包的服务器地址
# 查看当前的下包镜像源 npm config get registry # 将下包的镜像源切换为淘宝的镜像源 npm config set registry=https://registry.npm.taobao.org/ # 检查镜像源是否下载成功 npm config get registry
安装 nrm ,利用 nrm 提供的终端命令,可以快速查看和切换下包的镜像源。
# 通过 npm 包管理器,将 nrm 安装为全局可用的工具,-g 代表全局 npm i nrm -g # 查看所有可用的镜像源 nrm ls # 将下包的镜像源切换为 tobao 镜像 nrm use taobao
版权声明:本文为guolf521原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。