错误码:events.js:141 throw er; // Unhandled ‘error’ event—解决办法

错误码:events.js:141 throw er; // Unhandled ‘error’ event—解决办法

具体错误信息:

dev
events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE 127.0.0.1:8088
    at Object.exports._errnoException (util.js:873:11)
    at exports._exceptionWithHostPort (util.js:896:20)
    at Server._listen2 (net.js:1250:14)
    at listen (net.js:1286:10)
    at net.js:1395:9
    at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:64:16)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:83:10)

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "D:\\Program Files\\nodejs\\node.exe" "D:\\Program Files\\nodejs\\                                                                                                                node_modules\\npm\\bin\\npm-cli.js" "run" "dev_win"
npm ERR! node v4.4.7
npm ERR! npm  v2.15.8
npm ERR! code ELIFECYCLE
npm ERR! mmall-fe@1.0.0 dev_win: `set WEBPACK_ENV=dev && webpack-dev-server --in                                                                                                                line --port 8088`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mmall-fe@1.0.0 dev_win script 'set WEBPACK_ENV=dev && web                                                                                                                pack-dev-server --inline --port 8088'.
npm ERR! This is most likely a problem with the mmall-fe package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     set WEBPACK_ENV=dev && webpack-dev-server --inline --port 8088
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs mmall-fe
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls mmall-fe
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     E:\mygit\mmall-fe\npm-debug.log

错误原因:

端口号被占用。

解决方法:

查找被占用端口号,杀掉,重启。

1.cmd查询使用的端口号是否被占用:
netstat  -aon|findstr  "8088"
按回车显示占用8088端口对应的程序的PID号;
2.根据PID号找到对应的程序:继续输入命令:
tasklist|findstr "6376"
按回车后显示出占用该端口的程序;
3.按快捷键“Ctrl+Shift+Esc”调出Windows任务管理器,根据PID/
程序对应名称结束该程序进程即可。
4.重新编译项目即可。

其实只要获得PID就可以杀进程了~~~

  • 2
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值