您好,登录后才能下订单哦!
密码登录
登录注册
点击 登录注册 即表示同意《亿速云用户服务条款》
本篇内容主要讲解“ npm run dev 报错:getaddrinfo ENOTFOUND localhost如何解决”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“ npm run dev 报错:getaddrinfo ENOTFOUND localhost如何解决”吧!
mac:manage-web gwl$ npm run dev > leyou-manage-web@1.0.0 dev /Users/gwl/Desktop/manage-web > webpack-dev-server --inline --progress --config build/webpack.dev.conf.js 10% building modules 1/1 modules 0 activeevents.js:174 throw er; // Unhandled 'error' event ^ Error: getaddrinfo ENOTFOUND localhost at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:56:26) Emitted 'error' event at: at GetAddrInfoReqWrap.doListen [as callback] (net.js:1457:12) at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:56:17) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! leyou-manage-web@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 leyou-manage-web@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/gwl/.npm/_logs/2019-08-30T06_24_05_056Z-debug.log mac:manage-web gwl$
原因:
hosts文件中缺少 127.0.0.1和localhost的绑定
到此,相信大家对“ npm run dev 报错:getaddrinfo ENOTFOUND localhost如何解决”有了更深的了解,不妨来实际操作一番吧!这里是亿速云网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。