Error: listen EADDRNOTAVAIL: address not available 192.168.0.180:8080

Error: listen EADDRNOTAVAIL: address not available 192.168.0.180:8080
    at Server.setupListenHandle [as _listen2] (net.js:1239:19)
    at listenInCluster (net.js:1304:12)
    at doListen (net.js:1443:7)
    at processTicksAndRejections (internal/process/next_tick.js:76:17)
    at process.runNextTicks [as _tickCallback] (internal/process/next_tick.js:51:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:865:11)
    at internal/main/run_main_module.js:21:11
Emitted 'error' event at:
    at emitErrorNT (net.js:1283:8)
    at processTicksAndRejections (internal/process/next_tick.js:76:17)
    [... lines matching original stack trace ...]
    at internal/main/run_main_module.js:21:11
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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/dev/.npm/_logs/2019-03-29T03_45_36_334Z-debug.log

出现以下原因:

Error: listen EADDRNOTAVAIL: address not available 192.168.0.180:8080

解决方法:
在环境变量里设置了指定的host地址,更改此ip地址即可

步骤

1.  vim ~/.bash_profile 
2.  将 export HOST=192.168.0.180   改为  export HOST=192.168.0.220
3.  应用并生效 `source ~/.bash_profile`   或者重启电脑

你可能感兴趣的:(vue)