查看或设置npm的镜像地址

前提条件:已经搭建了 node 环境,nodejs是当下前端工程化开发必不可少的环境, 使用 nodejs 的 npm 功能来管理依赖包

npm是非常重要的npm管理工具,由于npm的服务器位于国外, 所以一般建议 将 npm设置成国内的淘宝镜像,在终端中执行以下命令

$ npm config set registry  https://registry.npm.taobao.org/  #设置淘宝镜像地址

查看当前 npm 的镜像地址

$ npm config get registry  #查看镜像地址

猜你喜欢

转载自blog.csdn.net/weixin_46611729/article/details/113970597