'Running into Network error: ws://localhost:3000/websocket: connect ECONNREFUSED 127.0.0.1:3000 Node.JS

I am currently trying to set up a Discord / Atshop bot. There is no need for you to know what Atshop.io is for this error - should be very easy to fix I am just not well versed in Node or this error.

Here is the repo: https://github.com/atomic404/atshop-replacements-discord-bot

I have entered all necessary info into the config file and already debugged and solved several errors like adding client intent etc..

Now when I run "node index.js" I get this error:

 throw err;
        ^
Network error: ws://localhost:3000/websocket: connect ECONNREFUSED 127.0.0.1:3000
(Use `node --trace-uncaught ...` to show where the exception was thrown)

And when I run:

pm2 start index.js --watch --name "Bot"

I get a list that says the bot is online for 0 seconds and then it closes and brings me back to empty terminal line..

In desperate need of help here!

Thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source