VUE Error: getaddrinfo ENOTFOUND localhost
本文介紹了VUE Error: getaddrinfo ENOTFOUND localhost,分享給大家。具體如下:
Jins-MBP:helloworld XXX$ npm run dev
> helloworld@1.0.0 dev /Users/XXX/Documents/develop/front/helloworld
> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js10% building modules 2/4 modules 2 active .../develop/front/helloworld/src/main.jsevents.js:183
throw er; // Unhandled 'error' event
^Error: getaddrinfo ENOTFOUND localhost
at errnoException (dns.js:50:10)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! helloworld@1.0.0 dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the helloworld@1.0.0 dev 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! /Users/XXX/.npm/_logs/2018-04-18T01_01_10_246Z-debug.log
根據(jù)報(bào)錯內(nèi)容,推斷是localhost的問題。有可能是localhost沒有綁定127.0.0.1。
修改方法:
添加host配置
127.0.0.1 localhost
以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
相關(guān)文章
vue+iview 兼容IE11瀏覽器的實(shí)現(xiàn)方法
這篇文章主要介紹了vue+iview 兼容IE11瀏覽器的實(shí)現(xiàn)方法,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2019-01-01基于vue v-for 循環(huán)復(fù)選框-默認(rèn)勾選第一個的實(shí)現(xiàn)方法
下面小編就為大家分享一篇基于vue v-for 循環(huán)復(fù)選框-默認(rèn)勾選第一個的實(shí)現(xiàn)方法,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧2018-03-03Vue.js實(shí)現(xiàn)可配置的登錄表單代碼詳解
這篇文章主要介紹了Vue.js實(shí)現(xiàn)可配置的登錄表單實(shí)例代碼詳解,文中給大家補(bǔ)充介紹了vue.js 全選與取消全選的實(shí)例代碼,需要的朋友可以參考下2018-03-03Vue實(shí)現(xiàn)當(dāng)前頁面刷新的4種方法舉例
我們在開發(fā)vue的頁面的時候,有時候會遇到需要刷新當(dāng)前頁面功能,但是vue框架自帶的router是不支持刷新當(dāng)前頁面功能,下面這篇文章主要給大家介紹了關(guān)于Vue實(shí)現(xiàn)當(dāng)前頁面刷新的4種方法,需要的朋友可以參考下2023-04-04