美文网首页
npm install 失败 无法连接 https://regi

npm install 失败 无法连接 https://regi

作者: xiangR | 来源:发表于2020-01-05 02:50 被阅读0次

    错误提示如下:

    npm install -g @bchatard/alfred-jetbrains
    
    npm ERR! code ENOTFOUND
    npm ERR! errno ENOTFOUND
    npm ERR! network request to https://registry.npmjs.org/@bchatard%2falfred-jetbrains failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org
    npm ERR! network This is a problem related to network connectivity.
    npm ERR! network In most cases you are behind a proxy or have bad network settings.
    npm ERR! network
    npm ERR! network If you are behind a proxy, please make sure that the
    npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /Users/xiangrui/.npm/_logs/2020-01-04T17_28_43_142Z-debug.log
    

    意思就是连接不上 https://registry.npmjs.org,在浏览器里访问这个网址果然访问不,是用手机访问 https://registry.npmjs.org 竟然可以访问,那么试着手机开个热点,电脑连上手机的网络,npm install -g @bchatard/alfred-jetbrains,成功了!
    记得可以试试浏览器请求 https://registry.npmjs.org/

    相关文章

      网友评论

          本文标题:npm install 失败 无法连接 https://regi

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