While Learning NodeJS : Correct Port Address In Use Error

How can I clear up this error message? Is there a way to reset the local server port address?

Error: listen EADDRINUSE: address already in use :::3000
at Server.setupListenHandle [as _listen2] (node:net:1334:16)
at listenInCluster (node:net:1382:12)
at Server.listen (node:net:1469:7)
at Object.start (/Users/xxxxxxxxxx/Desktop/Sites/blaxstud-nodejs/lib/server.js:91:16)
at Object. (/Users/xxxxxxxxxx/Desktop/Sites/blaxstud-nodejs/index.js:3:8)
at Module._compile (node:internal/modules/cjs/loader:1116:14)
at Object.Module._extensions…js (node:internal/modules/cjs/loader:1169:10)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at Function.c._load (node:electron/js2c/asar_bundle:5:13343) {
code: ‘EADDRINUSE’,
errno: -48,
syscall: ‘listen’,
address: ‘::’,
port: 3000
}

When I try to type it there’s no response. I tried 3-4 times, nothing. Then I decided to restart the computer. Once it rebooted and I opened Wappler, the port was opened without errors.

I’m not sure what happed, but hey, it works… So thanks Ken!

This error can come up quite frequently when developing with the local NodeJS server option. Select the terminal option to run the command mebeingken has linked in the post above and restart the local node server. There’s no visual confirmation that the port:3000 has been stopped/cleared when the command is run.

Screen Shot 2023-04-11 at 9.49.20 am

1 Like

Thank you so very much Guptast! Letting me know that there would be no visual confirmation helps a lot. I kept wondering if there was any prompt coming. Which led me to a restart just to be certain. Ha!

I appreciate your time and assistance.

1 Like