Erroe While Hosting Discord.js bot


#1

I get This error everytime!..

(node:3603) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:1988

11:41 AM

at Object._errnoException (util.js:992:11)

11:41 AM

at _exceptionWithHostPort (util.js:1014:20)

11:41 AM

at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1186:14)

11:41 AM

(node:3603) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)

11:41 AM

(node:3603) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

11:41 AM

(node:3603) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:1988

11:42 AM

at Object._errnoException (util.js:992:11)

11:42 AM

at _exceptionWithHostPort (util.js:1014:20)

11:42 AM

at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1186:14)

11:42 AM

(node:3603) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)

If ayn1 can help!


#2

Try using port 3000.


#3

Idk How?

Can u please guide me how do i do that?


#4

It’s difficult to say without seeing your project code as it can get the port number from several places. But you can try searching for the current port (1988) and if you find it, then update its value with 3000. Otherwise share the project name with us so we can view the code.


#5

Can i send the link through Message as i havent hidden the token in .env


#6

The name of project is ind


#7

Since your project is private, please DM me a join link so we can view the code. Thanks.


#8

Ok Ill send U The DM


#9

You had the debugger running, which was changing the port. So I’ve disabled that and then merged your express setup into your main index.js file as this wasn’t being used leading to constant loading. Let me know if you have any other issues.