npm淘宝镜像配置

因为npm服务器在国外的原因,导致我们在开发过程中使用npm下载一些第三方包的时候很慢,或者会下载失败,在使用中配置为淘宝镜像可方便的解决这个问题

永久配置方法:命令行输入
npm config set registry https://registry.npm.taobao.org/
单次使用:在npm install命令后添加这一段
--registry=https://registry.npm.taobao.org

//例如
npm install axios --registry=https://registry.npm.taobao.org
查看npm使用哪个源,可使用命令
npm config get registry