events.js:85
below;// Unhandled 'error' event
^
Error: getaddrinfo ENOTFOUND localhost
at errnoException (dns.js:44:10)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:94:26)
When I hit the gulp command, this error rarely occurs and the server does not wake up.The rare thing I wrote is that once you sleep and then wake up in the morning and hit this command, it can move.
This error appears even if you press the gulp serve command, so it appears to be an error around the gulp-webserver.
And sometimes it comes out like this.
...Uhoh. Got error getaddrinfo ENOTFOUND localhost...
Error: getaddrinfo ENOTFOUND localhost
at errnoException (dns.js:44:10)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:94:26)
events.js —85
below;// Unhandled 'error' event
^
Error: getaddrinfo ENOTFOUND localhost
at errnoException (dns.js:44:10)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:94:26)
The server tasks in gulpfile.js are as follows
gulp.task('serve', function(){
gulp.src('app/')
.pipe(webserver({
load: true,
directoryListening: true,
open —true
}));
});
I don't know the cause, so I would appreciate it if you could let me know.
javascript node.js gulp
to /private/etc/hosts
127.0.0.1 localhost
Add the
If there is no hosts file, create it
© 2024 OneMinuteCode. All rights reserved.