美文网首页
npm镜像源管理

npm镜像源管理

作者: hhhhhhhhhhhhaha | 来源:发表于2019-11-17 20:34 被阅读0次
    查看当前的源

    npm get registry

    方法一:使用NRM工具

    nrm是npm的镜像源管理工具,使用这个就可以快速地在 npm 源间切换
    npm install -g nrm
    或 临时使用淘宝源下载
    npm install -g nrm --registry https://registry.npm.taobao.org
    列出可选的源
    nrm ls
    切换到淘宝
    nrm use taobao

    方法二:直接切换

    单次使用, [name]为模块名
    npm install [name] --registry https://registry.npm.taobao.org
    永久使用
    npm config set registry https://registry.npm.taobao.org/

    相关文章

      网友评论

          本文标题:npm镜像源管理

          本文链接:https://www.haomeiwen.com/subject/chcmictx.html