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

235
Views
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 answers
Answer question

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 Report
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!