vue 开发 ip 地址错误提示信息

在运行项目的时候提示如下错误,则一定是 ip 出了问题

D:\project\flight\webtouch\TC.itravel.WebFly\fly>npm run dev

> fly@1.0.0 dev D:\project\flight\webtouch\TC.itravel.WebFly\fly
> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js

 10% building modules 1/1 modules 0 activeevents.js:183
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRNOTAVAIL 10.108.132.91:8082
    at Object._errnoException (util.js:992:11)
    at _exceptionWithHostPort (util.js:1014:20)
    at Server.setupListenHandle [as _listen2] (net.js:1338:19)
    at listenInCluster (net.js:1396:12)
    at doListen (net.js:1505:7)
    at _combinedTickCallback (internal/process/next_tick.js:141:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
    at Function.Module.runMain (module.js:695:11)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:612:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fly@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 fly@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!     C:\Users\zlweb1\AppData\Roaming\npm-cache\_logs\2018-10-19T04_22_18_376Z-debug.log

打开 cmd 输入 ipconfig 查看ip,复制ipv4地址 替换config/index.js 下 dev.host 变量即可
复制ipv4地址替换config/index.js 下 dev.host 变量即可

更多详细知识介绍请访问我的个人主页


AA一叶障目
8 声望0 粉丝

web前端开发工程师