Reputation: 21
events.js:85
throw er; // Unhandled 'error' event
^
Error: getaddrinfo ENOTFOUND localhost
at errnoException (dns.js:44:10)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:94:26)
When I ran 'gulp
' command, I met this error, but I don't know how to solve it. I also meet this error when I ran gulp serve
command, so I guess this error was caused by gulp-webserver
.
My gulp serve
task in gulpfile.js
is here.
gulp.task('serve', function() {
gulp.src('app/')
.pipe(webserver({
livereload: true,
directoryListening: true,
open: true
}));
});
Please tell me how to solve this problem.
Upvotes: 2
Views: 665
Reputation: 3586
Problem was with hosts
file on Mac Yosemite. To correct behavior in /private/etc/hosts
was added following line:
127.0.0.1 localhost
Upvotes: 1