npm是非常重要的npm管理工具,由于npm的服务器位于国外, 所以一般建议 将 npm设置成国内的淘宝镜像
# 查看当前的下包镜像源
npm config get registry
#设置为淘宝镜像
npm config set registry https://registry.npm.taobao.org
#检查是否设置成功
npm config get registry
文章讲述了如何查看和更改npm的包管理源,建议由于npm默认服务器在国外,可以将其配置为国内的淘宝镜像以提高下载速度。通过运行命令`npmconfiggetregistry`检查当前源,使用`npmconfigsetregistryhttps://registry.npm.taobao.org`设置淘宝镜像,再次运行`npmconfiggetregistry`确认设置是否成功。
npm是非常重要的npm管理工具,由于npm的服务器位于国外, 所以一般建议 将 npm设置成国内的淘宝镜像
# 查看当前的下包镜像源
npm config get registry
#设置为淘宝镜像
npm config set registry https://registry.npm.taobao.org
#检查是否设置成功
npm config get registry
747