Vue.js Project Preview Error(Part 3)

Bharathiraja
Ampersand Academy
Published in
1 min readApr 23, 2020

In Mac, I tried to preview the Veu.js project using the below command for the first time.

npm run serve

The command works fine, however i faced the below error on my Mac.

10% building 2/2 modules 0 activeevents.js:187
throw er; // Unhandled 'error' event
^
Error: getaddrinfo ENOTFOUND x86_64-apple-darwin13.4.0
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:60:26)
Emitted 'error' event on Server instance at:
at GetAddrInfoReqWrap.doListen [as callback] (net.js:1484:12)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:60:17) {
errno: 'ENOTFOUND',
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'x86_64-apple-darwin13.4.0'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test-vue@0.1.0 serve: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the test-vue@0.1.0 serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:

Solution

Open host file using the below command on your terminal

sudo nano /etc/host

Add this line in the host file

127.0.0.1       x86_64-apple-darwin13.4.0

Now run the serve command, it will work fine.

npm run serve

--

--

Bharathiraja
Ampersand Academy

AWS | DevOps | Kubernetes | Terraform| Angular | Deep&Machine Learning, Ionic, Full Stack Developer. Learn more at https://github.com/bharathirajatut