zoukankan      html  css  js  c++  java
  • NPM 所有的指令已经问题 使用淘宝镜像 出现code EAI_AGAIN

    windows怎么卸载cnpm?

    npm uninstall cnpm -g
    

    windows怎么检测cnpm是否安装成功

    cnpm -v
    

    我们直接将node的仓库地址换成淘宝仓库地址即可 

    单次使用

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

    永久使用

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

    手动修改设置

    1.打开.npmrc文件(C:Program Files
    odejs
    ode_modules
    pm
    pmrc,没有的话可以使用git命令行建一个( touch .npmrc),用cmd命令建会报错)
    2.增加 registry =https://registry.npm.taobao.org  即可。

    检测是否修改成功

     // 配置后可通过下面方式来验证是否成功

    npm config get registry
    // 或
    npm info express

    还原npm仓库地址的话,只需要在把地址配置成npm镜像就可以了 

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

     

    报错 使用淘宝镜像 出现code EAI_AGAIN

    解决办法:删除淘宝镜像(我自己没用切换官方的)

    设置淘宝镜像

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

    取消淘宝镜像

    npm config edit  //注释掉俩行
    

    命令删除

    npm config delete registry
    npm config delete disturl
    

     

  • 相关阅读:
    批量清理harbor镜像
    常用的git命令
    Gentoo网络管理方法总结
    Pelican主题配置:elegant
    Pelican搭建静态博客
    UNIX基础--安装应用程序: Packages 和 Ports
    UNIX基础--Manual Pages
    UNIX基础--Shells
    UNIX基础--进程和守护进程
    UNIX基础--磁盘组织
  • 原文地址:https://www.cnblogs.com/zytcomeon/p/13450739.html
Copyright © 2011-2022 走看看