vue 開發(fā) ip 地址錯誤提示信息
在運(yùn)行項目的時候提示如下錯誤输莺,則一定是 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模闲,復(fù)制ipv4地址 替換config/index.js 下 dev.host 變量即可