I have checked the other topics explaining same error, but the fixes do not seem to work for my project. PLEASE HELP! The error details are below:
Connected to MongoDB
node:events:504
throw er; // Unhandled ‘error’ event
^
Error: listen EADDRINUSE: address already in use :::3000
at Server.setupListenHandle [as _listen2] (node:net:1330:16)
at listenInCluster (node:net:1378:12)
at Server.listen (node:net:1465:7)
at Function.listen (/rbd/pnpm-volume/d3419df4-9f95-4c78-b2ca-78f929adccc5/node_modules/express/lib/application.js:635:24)
at NativeConnection. (/app/server.js:75:9)
at Object.onceWrapper (node:events:645:28)
at NativeConnection.emit (node:events:526:28)
at NativeConnection.Connection.onOpen (/rbd/pnpm-volume/d3419df4-9f95-4c78-b2ca-78f929adccc5/node_modules/mongoose/lib/connection.js:687:8)
at _setClient (/rbd/pnpm-volume/d3419df4-9f95-4c78-b2ca-78f929adccc5/node_modules/mongoose/lib/connection.js:969:8)
at _createMongoClient (/rbd/pnpm-volume/d3419df4-9f95-4c78-b2ca-78f929adccc5/node_modules/mongoose/lib/connection.js:898:3)
Emitted ‘error’ event on Server instance at:
at emitErrorNT (node:net:1357:8)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
code: ‘EADDRINUSE’,
errno: -98,
syscall: ‘listen’,
address: ‘::’,
port: 3000
}
If anyone can help me #1 understand what is going wrong (within the context of my project vs. others with same issue on Glitch support), and #2 offer a solution with a few steps and/or example code that would be much appreciated. Thank you!