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

99
Views
TypeError: Cannot assign to read only property 'map' of object '#<QueryCursor>'

I'm getting this error when I tried to host my logging bot on pterodactyl, but it works completely fine when I host it on my localhost or replit.

I'm using version 5.11.14 and it used to work fine.

const mongoose = require(`mongoose`);
const { db_pass } = require(`../../data/config.json`)

module.exports = {
  init: () => {
    const dbOptions = {
      useNewURLParser: true,
      useUnifiedTopology: true,
      autoIndex: false,
      poolSize: 5,
      connectTimeoutMS: 10000,
      family: 4
    }

    mongoose.connect(`mmy connection`, {
      useUnifiedTopology: true,
      useNewUrlParser: true
    })
    mongoose.set('useFindAndModify', false)
    mongoose.Promise = global.Promise

    mongoose.connection.on('connected', () => {
      console.log("Connected to the database!")
    })

    mongoose.connection.on('disconnected', () => {
      console.log("Disconnected from the database!")
    })

    mongoose.connection.on('err', (err) => {
      console.log("Error on the db " + err)
    })

  }
}

The error: Terminal

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!