NodeJS错误-throw er; // Unhandled 'error' event

第一眼看以为Express版本出现问题,因为本地已经存在另外一个运行的Node项目,端口重复,修改一下端口号即可,错误提示如下:

events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: listen EADDRINUSE
    at exports._errnoException (util.js:746:11)
    at Server._listen2 (net.js:1156:14)
    at listen (net.js:1182:10)
    at Server.listen (net.js:1267:5)
    at EventEmitter.listen (..//node_modules/express/lib/application.js:617:24)
    at Object. (../server.js:26:5)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)

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