node本地服务启动报错: listen EADDRINUSE

来源:互联网 发布:网络打字员兼职招聘网 编辑:程序博客网 时间:2024/06/04 18:53


报错
Server running at http://127.0.0.1:8888/events.js:160      throw er; // Unhandled 'error' event      ^Error: listen EADDRINUSE :::8888    at Object.exports._errnoException (util.js:1026:11)    at exports._exceptionWithHostPort (util.js:1049:20)    at Server._listen2 (net.js:1257:14)    at listen (net.js:1293:10)    at Server.listen (net.js:1389:5)    at Object.<anonymous> (D:\server.js:14:8)    at Module._compile (module.js:570:32)    at Object.Module._extensions..js (module.js:579:10)    at Module.load (module.js:487:32)    at tryModuleLoad (module.js:446:12)[Finished in 0.4s]

端口被占用,换成不是8888,即可。
2 0