Discord bot start up problem/error


#1

app@colorful-tangerine:~ 11:01
$ node bot.js
events.js:167
throw er; // Unhandled ‘error’ event
^
Error: listen EADDRINUSE: address already in use :::3000
at Server.setupListenHandle [as _listen2] (net.js:1290:14)
at listenInCluster (net.js:1338:12)
at Server.listen (net.js:1425:7)
at Function.listen (/rbd/pnpm-volume/1ea30e41-3727-409b-9ca7-a0ddc9b67b00/node_modules/.registry.npmjs.org/express/4.16.4/node_modules/express/lib/application.
js:618:24)
at Object. (/app/bot.js:8:5)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
Emitted ‘error’ event at:
at emitErrorNT (net.js:1317:8)
at process._tickCallback (internal/process/next_tick.js:63:19)
at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)

// When I execute node bot.js it’s error, anyone can help me?


#2

Just poking into the dark because you didn’t provide the source code to the error in “events.js” but guessing you are trying to use a port thats already occupied. Solution would be to not try to use that port if something else is already occupying it :sunglasses: