throw er; // Unhandled 'error' event

created at 07-04-2021 views: 3

error message

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: listen EADDRINUSE
    at errnoException (net.js:904:11)
    at Server._listen2 (net.js:1042:14)
    at listen (net.js:1064:10)
    at Server.listen (net.js:1138:5)
    at Object.<anonymous> (F:\socket\index.js:9:6)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)

solution

This kind of error usually means that another server that is already running uses the same port, just change the port.

created at:07-04-2021
edited at: 07-04-2021: