美文网首页
Vue [HPM] Error occurred while t

Vue [HPM] Error occurred while t

作者: ZaneYo | 来源:发表于2020-07-22 18:30 被阅读0次

    1,后台报错信息是这样的

    [HPM] Error occurred while trying to proxy request  from localhost:8081 to https://api.github.com/user (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)
    

    尝试全局搜索 Error occurred while trying to proxy request
    搜索结果是这样的

    ./node_modules/http-proxy-middleware/lib/index.js:
    '[HPM] Error occurred while trying to proxy request %s from %s to %s (%s) (%s)'
    

    查看./node_modules/http-proxy-middleware/lib/index.js
    是这么写的

    function logError(err, req, res) {
        var hostname =
          (req.headers && req.headers.host) || (req.hostname || req.host) // (websocket) || (node0.10 || node 4/5)
        var target = proxyOptions.target.host || proxyOptions.target
        var errorMessage =
          '[HPM] Error occurred while trying to proxy request %s from %s to %s (%s) (%s)'
        var errReference =
          'https://nodejs.org/api/errors.html#errors_common_system_errors' // link to Node Common Systems Errors page
    
        logger.error(
          errorMessage,
          req.url,
          hostname,
          target,
          err.code || err,
          errReference
        )
      }
    

    后台打印的是封装好的信息,但是第一个参数err是啥呢
    打印一下

    Error: connect ECONNREFUSED 13.250.168.23:443
        at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16) {
      errno: -61,
      code: 'ECONNREFUSED',
      syscall: 'connect',
      address: '13.250.168.23',
      port: 443
    }
    

    connect ECONNREFUSED 13.250.168.23:443
    连接被拒绝了
    好吧 最后搜了很多关于 connect ECONNREFUSED 13.250.168.23:443 的报错解决办法
    搜到了下面的一段话

    国内服务器访问 github 时常报错 connect ECONNREFUSED 13.250.168.23:443 这是个网络问题, github 的接口都是有限流的

    呵呵呵

    相关文章

      网友评论

          本文标题:Vue [HPM] Error occurred while t

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