Vue-cli: getaddrinfo ENOTFOUND when starting GUI with `vue ui`

Created on 10 Jul 2019  Â·  5Comments  Â·  Source: vuejs/vue-cli

Version

3.9.2

Environment info

  System:
    OS: macOS High Sierra 10.13.6
    CPU: (8) x64 Intel(R) Core(TM) i7-4960HQ CPU @ 2.60GHz
  Binaries:
    Node: 11.15.0 - ~/.nvm/versions/node/v11.15.0/bin/node
    Yarn: Not Found
    npm: 6.9.2 - ~/.nvm/versions/node/v11.15.0/bin/npm
  Browsers:
    Chrome: 75.0.3770.100
    Firefox: 67.0.4
    Safari: 12.1.1
  npmGlobalPackages:
    @vue/cli: 3.9.2

Steps to reproduce

vue ui produces this error:

Renes-MacBook-Pro:03 – Der Konfigurator reneeschke$ vue ui
🚀  Starting GUI...
events.js:170
      throw er; // Unhandled 'error' event
      ^

Error: getaddrinfo ENOTFOUND localhost
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:58:26)
Emitted 'error' event at:
    at Server.emit (events.js:193:13)
    at Server.EventEmitter.emit (domain.js:481:20)
    at GetAddrInfoReqWrap.doListen [as callback] (net.js:1443:12)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:58:17)

I tried it with node v10.7.0 and npm v6.9.0 and still the same error.
Macbook reboot and reinstalling @vue/cli also didn't work.
I don't know what changed– I had it working a few days back.

What is expected?

Working vue ui :(

What is actually happening?

It's not!

Most helpful comment

Please make sure the following line exists (and not commented out) in your /etc/hosts

127.0.0.1   localhost

All 5 comments

Please make sure the following line exists (and not commented out) in your /etc/hosts

127.0.0.1   localhost

That solved the issue;
but... – any idea how this got changed in the first place?

getaddrinfo ENOTFOUND cch1wpts02 cch1wpts02:80 at GetAddrInfoReqWrap.onlookup

Can anyone help me with this?

@ShashankM3-hexaware looks like you have a HOST environment variable set to cch1wpts02. Either delete it or append the following line to /etc/hosts

127.0.0.1 cch1wpts02

or run the command with a --host argument:

vue ui --host 127.0.0.1

@sodatea , API which i was using is a local VM API, I was trying to hit that API from AWS server, That was the error. Thanks for your response.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JIANGYUJING1995 picture JIANGYUJING1995  Â·  3Comments

jgribonvald picture jgribonvald  Â·  3Comments

NathanKleekamp picture NathanKleekamp  Â·  3Comments

DrSensor picture DrSensor  Â·  3Comments

miyamoto-san picture miyamoto-san  Â·  3Comments