npm 使用国内镜像

 第一种方式使用cnpm

npm install -g cnpm --registry=https://registry.npm.taobao.org

使用 cnpm 命令来安装模块了(name模块名):

cnpm install name

 第二种 配置 registry(推荐

//设置
npm config set registry https://registry.npm.taobao.org 

//查看
npm config get registry

猜你喜欢

转载自blog.csdn.net/takujo/article/details/86743663