Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

123
Visualizações
Discord.JS bot on heroku

Yesterday I've created a Discord bot using Discord.JS and it's working properly when I'm using my bot locally but after hosting it on Heroku it's not working anymore and the bot is offline. In Heroku logs I can see this:

2021-09-15T13:39:08.604792+00:00 heroku[worker.1]: State changed from crashed to starting
2021-09-15T13:39:10.850210+00:00 heroku[worker.1]: Starting process with command `node index.js`
2021-09-15T13:39:11.455306+00:00 heroku[worker.1]: State changed from starting to up
2021-09-15T13:39:12.189682+00:00 heroku[worker.1]: Process exited with status 0
2021-09-15T13:39:12.264472+00:00 heroku[worker.1]: State changed from up to crashed
2021-09-15T13:39:12.039073+00:00 app[worker.1]: (node:4) UnhandledPromiseRejectionWarning: ReferenceError: AbortController is not defined
2021-09-15T13:39:12.039088+00:00 app[worker.1]:     at RequestHandler.execute (/app/node_modules/discord.js/src/rest/RequestHandler.js:172:15)
2021-09-15T13:39:12.039088+00:00 app[worker.1]:     at RequestHandler.execute (/app/node_modules/discord.js/src/rest/RequestHandler.js:176:19)
2021-09-15T13:39:12.039088+00:00 app[worker.1]:     at RequestHandler.push (/app/node_modules/discord.js/src/rest/RequestHandler.js:50:25)
2021-09-15T13:39:12.039089+00:00 app[worker.1]:     at async WebSocketManager.connect (/app/node_modules/discord.js/src/client/websocket/WebSocketManager.js:128:9)
2021-09-15T13:39:12.039089+00:00 app[worker.1]:     at async Client.login (/app/node_modules/discord.js/src/client/Client.js:245:7)
2021-09-15T13:39:12.039090+00:00 app[worker.1]: (Use `node --trace-warnings ...` to show where the warning was created)
2021-09-15T13:39:12.039423+00:00 app[worker.1]: (node:4) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
2021-09-15T13:39:12.039451+00:00 app[worker.1]: (node:4) [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.

I completely don't know what is the reason for that error. If anyone could help me I would be glad

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Your questions was already answered in another question. Answer by Nick Parsons. Basically, you have to change your node version.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda