cnpm 使用教程
有很多方法来配置npm的registry地址,下面根据不同情境列出几种比较常用的方法。以淘宝npm镜像举例:
淘宝 npm 地址: http://npm.taobao.org/
临时使用
1 | npm --registry https://registry.npm.taobao.org install hexo |
持久使用
1 | npm config set registry https://registry.npm.taobao.org |
配置后使用shell命令验证是否成功npm config get registry
安装cnpm
1 | npm install -g cnpm --registry=https://registry.npm.taobao.org |
使用cnpm 安装模块
1 | cnpm install hexo |
欢迎扫码关注公众号,更好的交流
原文作者: xiuxiuing
原文链接: https://xiuxiuing.gitee.io/blog/2018/08/25/cnpm/
许可协议: 知识共享署名-非商业性使用 4.0 国际许可协议