qq_42403503 2020-09-08 23:13:34 1443 收藏 2
    文章标签: npm nodejs
    版权
    用淘宝的镜像下载资源 国内的访问速度会比较快

    一、npm命令:不改变原来的名称,只是换了一个下载资源

    1.npm设置淘宝镜像

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

    npm config set disturl https://npm.taobao.org/dist

    2.npm删除淘宝镜像
    npm config delete registry
    npm config delete disturl

    二、cnpm命令:重新安装一个cnpm,用cnpm命令

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

    来源:

    https://www.jianshu.com/p/163c31c1a00e

    https://www.jianshu.com/p/92116d8d2298


    ————————————————
    版权声明:本文为CSDN博主「qq_42403503」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/qq_42403503/article/details/108479464

    npm查看源:

    npm config get registry
    1
    或者

    npm config list
    1
    设置成淘宝源:

    npm config set registry https://registry.npm.taobao.org/
    1
    设置成npm官方源:

    npm config set registry https://registry.npmjs.org/
    1
    npm 删除源使用rm 命令

    npm config rm registry
    1

    ————————————————
    版权声明:本文为CSDN博主「zoepriselife316」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/zoepriselife316/article/details/103178021