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

131
Views
I have problems with heroku

I'm making a bot for discord, and I have problems with mongose ​​when uploading the app to heroku, it works fine locally but it crashes on heroku with the following error:

2022-02-11T00:00:17.341218+00:00 app[worker.1]: QueryCursor.prototype.map = function(fn) {
2022-02-11T00:00:17.341218+00:00 app[worker.1]:                           ^
2022-02-11T00:00:17.341218+00:00 app[worker.1]: 
2022-02-11T00:00:17.341219+00:00 app[worker.1]: TypeError: Cannot assign to read only property 'map' of object '#<QueryCursor>'
2022-02-11T00:00:17.341219+00:00 app[worker.1]:     at Object.<anonymous> (/app/node_modules/mongoose/lib/cursor/QueryCursor.js:144:27)
2022-02-11T00:00:17.341220+00:00 app[worker.1]:     at Module._compile (node:internal/modules/cjs/loader:1097:14)
2022-02-11T00:00:17.341220+00:00 app[worker.1]:     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1151:10)
2022-02-11T00:00:17.341220+00:00 app[worker.1]:     at Module.load (node:internal/modules/cjs/loader:975:32)
2022-02-11T00:00:17.341220+00:00 app[worker.1]:     at Function.Module._load (node:internal/modules/cjs/loader:822:12)
2022-02-11T00:00:17.341221+00:00 app[worker.1]:     at Module.require (node:internal/modules/cjs/loader:999:19)
2022-02-11T00:00:17.341221+00:00 app[worker.1]:     at require (node:internal/modules/cjs/helpers:102:18)
2022-02-11T00:00:17.341221+00:00 app[worker.1]:     at Object.<anonymous> (/app/node_modules/mongoose/lib/query.js:12:21)
2022-02-11T00:00:17.341222+00:00 app[worker.1]:     at Module._compile (node:internal/modules/cjs/loader:1097:14)
2022-02-11T00:00:17.341222+00:00 app[worker.1]:     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1151:10)
2022-02-11T00:00:17.341227+00:00 app[worker.1]: 
2022-02-11T00:00:17.341227+00:00 app[worker.1]: Node.js v17.5.0```

As I said it works fine locally but not on heroku and I don't know why it happens, can someone help me?
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!