小小园丁

npm 镜像使用

1、npm安装包时候,报错这个http://..........不能够访问 not accessible 

     或者安装起来很慢,这个是因为要访问国外的网站。 

     npmde 的默认安装源是:http://registry.npmjs.org

 * 解决办法   

   设置其他的源: npm config set registry https://registry.npm.taobao.org

                              npm config get registry

   npm --registry https://registry.npm.taobao.org info underscore

   编辑 .npmrc增加

   registry = https://registry.npm.taobao.org

 

    使用cnpm:npm install -g cnpm --registry=https://registry.......

                      cnpm install ........

几个常用国内镜像:...

    

posted on 2020-06-24 23:09  小小园丁  阅读(428)  评论(0编辑  收藏  举报

导航