npm加速

npm.png

直接写入默认库配置

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

命令行指定库

npm --registry http://registry.cnpmjs.org
建议使用淘宝库
https://registry.npm.taobao.org

举例

原本安装hubot
npm install -g yo generator-hubot
现在变成
npm --registry http://registry.cnpmjs.org install -g yo generator-hubot

Last modification:November 13th, 2019 at 09:22 am
If you think my article is useful to you, please feel free to appreciate

Leave a Comment