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

237
Visualizações
Heroku Node.js Discord.js deployment failed

Not sure what the problem is, Had to follow a few yt-bers one used tsc but had to switch to js completely.

2022-01-09T20:58:40.370270+00:00 app[worker.1]: /app/node_modules/discord.js/src/rest/APIRequest.js:33
2022-01-09T20:58:40.370282+00:00 app[worker.1]:     agent ??= new https.Agent({ ...this.client.options.http.agent, keepAlive: true });
2022-01-09T20:58:40.370282+00:00 app[worker.1]:           ^^^
2022-01-09T20:58:40.370283+00:00 app[worker.1]: 
2022-01-09T20:58:40.370283+00:00 app[worker.1]: SyntaxError: Unexpected token '??='
2022-01-09T20:58:40.370284+00:00 app[worker.1]:     at wrapSafe (internal/modules/cjs/loader.js:1001:16)
2022-01-09T20:58:40.370284+00:00 app[worker.1]:     at Module._compile (internal/modules/cjs/loader.js:1049:27)
2022-01-09T20:58:40.370284+00:00 app[worker.1]:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
2022-01-09T20:58:40.370285+00:00 app[worker.1]:     at Module.load (internal/modules/cjs/loader.js:950:32)
2022-01-09T20:58:40.370285+00:00 app[worker.1]:     at Function.Module._load (internal/modules/cjs/loader.js:790:12)
2022-01-09T20:58:40.370286+00:00 app[worker.1]:     at Module.require (internal/modules/cjs/loader.js:974:19)
2022-01-09T20:58:40.370286+00:00 app[worker.1]:     at require (internal/modules/cjs/helpers.js:93:18)
2022-01-09T20:58:40.370286+00:00 app[worker.1]:     at Object.<anonymous> (/app/node_modules/discord.js/src/rest/RESTManager.js:4:20)
2022-01-09T20:58:40.370287+00:00 app[worker.1]:     at Module._compile (internal/modules/cjs/loader.js:1085:14)
2022-01-09T20:58:40.370287+00:00 app[worker.1]:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
2022-01-09T20:58:40.611984+00:00 heroku[worker.1]: State changed from up to crashed 
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

SyntaxError: Unexpected token '??='

The version of Node.js you are using doesn't understand the nullish assignment operator, ??=. That operator was introduced at some point in the 15.x development cycle.

Ask Heroku to use Node 16 (or later) by including an engines section in your package.json, e.g.

{
  "name": "Some Application",
  "description": "An application that does cool stuff",
  "version": "1.0.0",
  "engines": {
    "node": "16.x"
  }
}
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