{"id":214,"hash":"525793cf1005a2cde72e56898efbd1ba6cb22df71df1f5ac964bef4b029683fe","pattern":"ExpressJS - throw er Unhandled error event","full_message":"I created expressjs application using the following commands:\n\nexpress -e folderName\nnpm install ejs --save\nnpm install\n\nWhen I run the application with: node app.js, I have the following errors:\n\nevents.js:72\n    throw er; // Unhandled 'error' event\n          ^\nError: listen EADDRINUSE\n    at errnoException (net.js:884:11)\n    at Server._listen2 (net.js:1022:14)\n    at listen (net.js:1044:10)\n    at Server.listen (net.js:1110:5)\n    at Object.<anonymous> (folderName/app.js:33:24)\n    at Module._compile (module.js:456:26)\n    at Object.Module._extensions..js (module.js:474:10)\n    at Module.load (module.js:356:32)\n    at Function.Module._load (module.js:312:12)\n    at Function.Module.runMain (module.js:497:10)\n\nHow to fix it?","ecosystem":"npm","package_name":"node.js","package_version":null,"solution":"You had run another server use the same port like 8080.\n\nMaybe you had run node app in other shell, Please close it and run again.\n\nYou can check PORT no. is available or not using\n\nnetstat -tulnp | grep <port no>\n\nAlternatively, you can use lsof:\n\nlsof -i :<port no>","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/16827987/expressjs-throw-er-unhandled-error-event","votes":201,"created_at":"2026-04-19T04:41:32.694917+00:00","updated_at":"2026-04-19T04:51:14.652815+00:00"}