Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

232
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda