Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webpack-dev-server can't find localhost #420

Closed
em-cd opened this issue Mar 3, 2016 · 3 comments
Closed

webpack-dev-server can't find localhost #420

em-cd opened this issue Mar 3, 2016 · 3 comments

Comments

@em-cd
Copy link

em-cd commented Mar 3, 2016

I'm running Yosemite on a mac. I installed the webpack server ok but when I run the command webpack-dev-server I get the error:

events.js:154
throw er; // Unhandled 'error' event
^

Error: getaddrinfo ENOTFOUND localhost
at errnoException (dns.js:26:10)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:77:26)

I've checked the hosts file and localhost is correctly listed there. I am also using MAMP for another project on port 80, so I tried running the server on a different port with the command webpack-dev-server --port 3001 but got the exact same error. Any ideas why this is happening?

@em-cd em-cd closed this as completed Mar 3, 2016
@em-cd
Copy link
Author

em-cd commented Mar 3, 2016

nvm, /etc/hosts was messed up after all. my bad!

@nebiljabari
Copy link

If it can help someone with the same annoying error : angular/angular-cli#2227 (comment)

@Chewiwehavecompany
Copy link

I tried to run the command ng serve in terminal and I get this error

getaddrinfo ENOTFOUND localhost
Error: getaddrinfo ENOTFOUND localhost
at errnoException (dns.js:50:10)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)

Help please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants