美文网首页
Vue Error: getaddrinfo ENOTFOUND

Vue Error: getaddrinfo ENOTFOUND

作者: Benny_lzb | 来源:发表于2018-11-10 14:29 被阅读24次
    lean-webpack-plugin: /Users/elviszhu/Desktop/LksProject/Lks.S/Web/Lks.Passport.New/build/dist has been removed.
     10% building modules 8/8 modules 0 activeevents.js:160
          throw er; // Unhandled 'error' event
          ^
    
    Error: listen EADDRNOTAVAIL 172.0.0.1:8080
        at Object.exports._errnoException (util.js:1026:11)
        at exports._exceptionWithHostPort (util.js:1049:20)
        at Server._listen2 (net.js:1249:19)
        at listen (net.js:1298:10)
        at net.js:1397:7
        at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:62:16)
        at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:81:10)
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! lks-passport@1.0.0 dev: `webpack-dev-server --watch-content-base --inline --progress --config build/webpack.dev.js`
    

    一脸懵逼刚开始,无缘无故报错了。
    一查发现原来是我误删了 switchHosts中的127.0.0.1 localhost这一东西

    解决办法
    没有指定 localhost,在host文件中添加如下内容:
    127.0.0.1 localhost

    推荐下载个switchHosts随意切换host~~~

    相关文章

      网友评论

          本文标题:Vue Error: getaddrinfo ENOTFOUND

          本文链接:https://www.haomeiwen.com/subject/lemzxqtx.html