错误:在启动 grunt-fetch-pages (node.js) 时连接 ECONNREJECT 127.0.1.1



我在启动获取页面 Grunt 插件时遇到了这个问题:

Running "fetchpages:dist" (fetchpages) task
Fetching pages...
skipping duplicate page {"local":"public_html/speed/www-fetched/index.html","remote":"http://example.com/"}
Creating folders...
  https://example.com/ -> public_html/speed/www-fetched/index.html
{ Error: connect ECONNREFUSED 127.0.1.1:80
    at Object.exports._errnoException (util.js:1020:11)
    at exports._exceptionWithHostPort (util.js:1043:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14)
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.1.1',
  port: 80 }
  https://example.com/scrap-metal-prices -> public_html/speed/www-fetched/scrap-price.html

我以前从未在其他项目中看到过这种错误。

我使用 grunt-fetch-pages@2.0.0 和 Node v6.11.5。

这是什么意思以及如何解决?

我刚刚在/etc/hosts 中评论了 (#) 这个字符串:

#127.0.1.1 example.com example

现在没关系了。

最新更新