'Getting Error: getaddrinfo ENOTFOUND x86_64-apple-darwin13.4.0 while using npm run serve command

I am trying to create a website using node.js and vue.js. So to run the code, I first change the directory to my project directory, in terminal and use npm run serve command. But still I am getting an error. I have even re-downloaded npm libraries using npm install command.
Error is,

vue-cli-service serve INFO Starting development server... 10% building 5/5 modules 0 activeevents.js:174
throw er; // Unhandled 'error' event
^

Error: getaddrinfo ENOTFOUND x86_64-apple-darwin13.4.0 at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:56:26) Emitted 'error' event at: at GetAddrInfoReqWrap.doListen [as callback] (net.js:1448:12) at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:56:17)

Any help will be greatly appreciated.



Solution 1:[1]

typing unset HOST on terminal fixed the problem for me.

Solution 2:[2]

It's about ip of x86_64-apple-darwin13.4.0.

Add

127.0.0.1       x86_64-apple-darwin13.4.0 

to /etc/hosts file. Then the problem is gone. I met the same problem today.

Solution 3:[3]

If you are using iTerm2, try updating it to the latest version. Version 3.3.2 fixed for me.

Solution 4:[4]

echo $HOST to check env variable value for $HOST

if its not set to 'localhost' use export to set to 'localhost' export HOST="localhost"

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 David Kong
Solution 2 spikeyang
Solution 3
Solution 4 aheesh