Error: getaddrinfo ENOTFOUND x86_64-conda_cos6-linux-gnu
See original GitHub issueVersion
3.8.2
Reproduction link
Environment info
System:
OS: Linux 4.19 Manjaro Linux undefined
CPU: (4) x64 Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz
Binaries:
Node: 11.15.0 - /usr/bin/node
Yarn: Not Found
npm: 6.9.0 - /usr/bin/npm
Browsers:
Chrome: Not Found
Firefox: 67.0
npmPackages:
@vue/babel-helper-vue-jsx-merge-props: 1.0.0-beta.3
@vue/babel-plugin-transform-vue-jsx: 1.0.0-beta.3
@vue/babel-preset-app: 3.6.0
@vue/babel-preset-jsx: 1.0.0-beta.3
@vue/babel-sugar-functional-vue: 1.0.0-beta.3
@vue/babel-sugar-inject-h: 1.0.0-beta.3
@vue/babel-sugar-v-model: 1.0.0-beta.3
@vue/babel-sugar-v-on: 1.0.0-beta.3
@vue/cli-overlay: 3.7.0
@vue/cli-plugin-babel: ^3.6.0 => 3.6.0
@vue/cli-plugin-eslint: ^3.6.0 => 3.6.0
@vue/cli-plugin-unit-mocha: ^3.6.0 => 3.6.0
@vue/cli-service: ^3.7.0 => 3.7.0
@vue/cli-shared-utils: 3.6.0 (3.7.0)
@vue/component-compiler-utils: 2.6.0
@vue/eslint-config-prettier: ^4.0.1 => 4.0.1
@vue/preload-webpack-plugin: 1.1.0
@vue/test-utils: 1.0.0-beta.29 => 1.0.0-beta.29
@vue/web-component-wrapper: 1.2.0
eslint-plugin-vue: ^5.0.0 => 5.2.2 (4.7.1)
vue: ^2.6.10 => 2.6.10
vue-cli-plugin-vuetify: ^0.5.0 => 0.5.0
vue-eslint-parser: 2.0.3 (5.0.0)
vue-hot-reload-api: 2.3.3
vue-loader: 15.7.0
vue-router: ^3.0.3 => 3.0.6
vue-style-loader: 4.1.2
vue-template-compiler: ^2.5.21 => 2.6.10
vue-template-es2015-compiler: 1.9.1
vuetify: ^1.5.5 => 1.5.12
npmGlobalPackages:
@vue/cli: 3.8.2
Steps to reproduce
- Create a vue project
- Try to run it with
npm run serve
What is expected?
To build and run the server
What is actually happening?
INFO Starting development server...
10% building 2/2 modules 0 activeevents.js:170
throw er; // Unhandled 'error' event
^
Error: getaddrinfo ENOTFOUND x86_64-conda_cos6-linux-gnu
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:58:26)
Emitted 'error' event at:
at GetAddrInfoReqWrap.doListen [as callback] (net.js:1443:12)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:58:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! website@0.1.0 serve: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the website@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:
npm ERR! /home/terabyte/.npm/_logs/2019-05-30T16_21_56_926Z-debug.log
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Node.js getaddrinfo ENOTFOUND - Stack Overflow
I did already look up this error on stackoverflow, and realized that this is because node.js cannot find the server from DNS (I...
Read more >Node.js Error Message “getaddrinfo ENOTFOUND localhost ...
If you try to run your JSON server and see this error message “getaddrinfo ENOTFOUND localhost,” it's happening because Webpack cannot find your...
Read more >Getaddrinfo ENOTFOUND: Get a Premium Solution for the Error
The getaddrinfo ENOTFOUND error can be thrown due to invalid values provided to the options of the http.get() function or a missing line...
Read more >http.get returns "getaddrinfo ENOTFOUND" error #5436 - GitHub
Hi all, I'm trying to fix following problem since five days. When I'm doing a http.get("http://url/", cb); or http.get(options, cb); ...
Read more >Node.js error: getaddrinfo ENOTFOUND localhost - Andrew Mok
The error getaddrinfo ENOTFOUND localhost is caused by Webpack cannot found localhost address. To solve it, open the terminal:
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s also solved my problem as well. Amazing solution @sodatea.
For whom, on macOS, get the same error or with the Nodejs error code
EADDRNOTAVAIL
(see below the full error message), and you are certain your/etc/hosts
set thelocalhost
correctly.In my case, using iterm2 with zsh,
Which clearly is not
localhost
.By setting the $HOST to localhost or empty, i.e.
Then the
vue serve
works as expected,I’m not sure if this problem is more likely encountered by iTerm user. I’ve inspected the
.zshrc
and found no sigh of assigning HOST variable. And the mac terminal’s HOST variable has no value.There are ofc. other solutions like in full app we would pass config directly to webpack, or modify the
package.json
scripts, i.e."serve": "vue-cli-service serve --host localhost"
, which are less elegant.On macos, when I simply run
vue serve
or `vuePlease check if you have a
$HOST
environment variable set. If so, delete or overwrite it and try again.