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

210
Views
I'm trying to create a discord bot with Heroku, when I run it locally it works, but it doesn't work when I deploy it on Heroku

When I run index.js locally, it works. When I try to deploy the code on Heroku, this is the error that I recieve.

2022-01-11T05:25:24.034595+00:00 app[worker.1]:     at Module._compile (node:internal/modules/cjs/loader:1101:14)
2022-01-11T05:25:24.034595+00:00 app[worker.1]:     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
2022-01-11T05:25:24.034595+00:00 app[worker.1]:     at Module.load (node:internal/modules/cjs/loader:981:32)
2022-01-11T05:25:24.034595+00:00 app[worker.1]:     at Function.Module._load (node:internal/modules/cjs/loader:822:12)
2022-01-11T05:25:24.034595+00:00 app[worker.1]:     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
2022-01-11T05:25:24.034596+00:00 app[worker.1]:   code: 'MODULE_NOT_FOUND',
2022-01-11T05:25:24.034596+00:00 app[worker.1]:   requireStack: [ '/app/index.js' ]
2022-01-11T05:25:24.034596+00:00 app[worker.1]: }
2022-01-11T05:25:24.156241+00:00 heroku[worker.1]: Process exited with status 1
2022-01-11T05:25:24.201235+00:00 heroku[worker.1]: State changed from up to crashed

Contents of package.json

{
  "dependencies": {
    "discord.js": "^13.5.1"
  },
  "engines": {
    "node": "16.13.1"
  },
  "name": "yourstickers-bot",
  "version": "1.0.0",
  "main": "index.js",
  "devDependencies": {},
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/TheBread-Master/yourstickers-bot.git"
  },
  "author": "Bread",
  "license": "ISC",
  "bugs": {
    "url": "https://github.com/TheBread-Master/yourstickers-bot/issues"
  },
  "homepage": "https://github.com/TheBread-Master/yourstickers-bot#readme",
  "description": ""
}

I ran npm init and it still didn't work.

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!