vue项目启动出现的问题

vue踩坑-Error: listen EADDRNOTAVAIL 192.168.1.122:8081

Error: listen EADDRNOTAVAIL 192.168.1.122:8081
    at Object._errnoException (util.js:1024:11)
    at _exceptionWithHostPort (util.js:1046:20)
    at Server.setupListenHandle [as _listen2] (net.js:1334:19)
    at listenInCluster (net.js:1392:12)
    at doListen (net.js:1501: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:678:11)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3
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!     C:\Program Files\nodejs\node_cache\_logs\2018-08-28T03_29_03_820Z-debug.log

1:cd /项目名称
下面就是运行项目了,cd /项目名称,我的文件放在D盘,所以先进入d盘,再进入项目。
cd ShopApp
2:npm run dev
一切准备就绪,启动项目
npm run dev

但是,却出现了以下的报错,一开始很郁闷,仔细看了一下错误提示,应该是IP地址出错了。

之前为了能在手机上访问vue的项目,找到config文件夹下的index.js文件,打开后,将host的值改为我本地的ip
接!

你可能感兴趣的:(vue项目启动出现的问题)