Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

151
Views
Heroku worker crashing instantly when starting discordjs bot

I have been working on a discord bot that is working fine when run locally, but it is crashing when hosted on heroku.

  • I tried to create a Procfile with the following line: worker : node bot.js
  • I also checked in heroku resources, disabled web and enabled the worker dyno.
  • I have not exceeded the 550 hour monthly limit.

This is the package.json:

{
  "name": "randomizerbot",
  "version": "1.0.0",
  "description": "",
  "main": "bot.js",
  "scripts": {
    "start": "node bot.js"
  },
  "engines": {
    "node": ">=16.6.0"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "discord.js": "^13.6.0",
    "dotenv": "^16.0.0",
    "nodemon": "^2.0.15"
  }
}

This is my file structure:

file structure

This is the error log:

2022-07-11T14:48:48.995714+00:00 heroku[worker.1]: State changed from crashed to starting

2022-07-11T14:48:51.478349+00:00 heroku[worker.1]: Starting process with command `: node bot.js`

2022-07-11T14:48:52.092041+00:00 heroku[worker.1]: State changed from starting to up

2022-07-11T14:48:52.341005+00:00 heroku[worker.1]: Process exited with status 0

2022-07-11T14:48:52.809725+00:00 heroku[worker.1]: State changed from up to crashed

Is there something that I am missing? Thanks in advance.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!