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
搜索結(jié)果是這樣的
./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
)
}
后臺打印的是封裝好的信息铣焊,但是第一個參數(shù)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 的報錯解決辦法
搜到了下面的一段話
國內(nèi)服務器訪問 github 時常報錯 connect ECONNREFUSED 13.250.168.23:443 這是個網(wǎng)絡問題, github 的接口都是有限流的
呵呵呵