Discord Bot Stopped Working on Heroku Platform

My Discord bot was running fine on Heroku but now it’s not working anymore. I’m pretty new to using Heroku for hosting so I don’t know much about troubleshooting. I already tried redeploying from my GitHub repository but that didn’t fix the problem.

When I check the logs, I see these errors:

Before accessing the app:

2018-07-23T16:54:27.265702+00:00 app[worker.1]: at Function.Module._load (module.js:497:3)
2018-07-23T16:54:27.265704+00:00 app[worker.1]: at Function.Module.runMain (module.js:693:10)
2018-07-23T16:54:27.265705+00:00 app[worker.1]: at startup (bootstrap_node.js:191:16)
2018-07-23T16:54:27.327613+00:00 heroku[worker.1]: State changed from up to crashed
2018-07-23T16:54:27.310511+00:00 heroku[worker.1]: Process exited with status 1

When trying to open the app:

2018-07-23T16:58:44.866697+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=cratefield.herokuapp.com request_id=b32a5f7d-157e-45a5-805b-8c306140d020 fwd="73.23.238.216" dyno= connect= service= status=503 bytes= protocol=https

What could be causing this issue and how can I get my bot back online?

Looking at your logs, the module loading error combined with the H14 suggests your dyno configuration might be mixed up. Discord bots don’t need web dynos at all since they connect directly to Discord’s gateway, not serve HTTP requests. You should disable any web dynos completely and only run worker dynos. Go to your Heroku dashboard, check the Resources tab, and make sure you have zero web dynos running and one worker dyno enabled. The H14 error happens because Heroku expects web processes when you have web dynos configured, but your bot doesn’t provide any web interface. I ran into this exact same issue when I first deployed my bot and was confused why it kept trying to start web processes.

The crash with status 1 suggests there’s likely a missing dependency or environment variable issue. Check if your bot token is properly set in Heroku’s config vars - go to your app settings and make sure the environment variable for your Discord token matches what your code expects. Also verify that all your package dependencies are correctly listed in package.json since Heroku installs them during deployment. I had similar crashes when my token wasn’t configured properly in the Heroku dashboard even though it worked locally.

sounds like ur procfile is off or missing. the H14 error typically means heroku can’t find web proccesses, but the bot needs worker ones. make sure u have a Procfile with worker: node yourbot.js set up, not web stuff.