throw er; // Unhandled 'error' event

运行入口文件时的问题:
events.js:160
throw er; // Unhandled 'error' event
^

Error: listen EACCES 0.0.0.0:80
at Object.exports._errnoException (util.js:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at Server._listen2 (net.js:1244:19)
at listen (net.js:1293:10)
at Server.listen (net.js:1389:5)
at Object. (/Users/apple/socket-test/app.js:30:5)
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)

解决办法:出现这种情况一般是端口被复用了,更换端口即可解决。

你可能感兴趣的:(throw er; // Unhandled 'error' event)