EnderH

天是棺材盖,地是棺材板;喜怒哀乐事,全在棺材里!

npm安装cnpm

详细见:https://npm.taobao.org/

淘宝镜像:

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

然后就可以使用cnpm代替npm

设置默认:

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

同步模块

直接通过 sync 命令马上同步一个模块, 只有 cnpm 命令行才有此功能:

cnpm sync connect

当然,最好建议不要直接使用 cnpm 安装依赖,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题
npm install --registry=https://registry.npm.taobao.org

  

posted on 2019-07-09 15:59  EnderH  阅读(400)  评论(0编辑  收藏  举报

导航