Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

mongoose 5 - fix not working correctly

See original GitHub issue

@buunguyen I tried latest version with the new mongoose 5 fix, unfortunately the rewritten fix does not work in my setup. I guess because I’m using the bluebird library.

const Promise = require('bluebird'); // bluebird
mongoose.Promise = Promise;

Therefore if (mongoose.Promise === Promise) { is not true in my case. Anyways, I have seen there is a mongoose.version variable available.

I’ll create a PR - please review.

thanks Simon

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

simllllcommented, Feb 5, 2018

@yamifr07 indeed, this is the same issue I had. I opened already a PR that fixes it.

buunguyencommented, Feb 7, 2018

Sorry, please check again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migrating from 4.x to 5.x - Mongoose
The connection string and options are then passed down to the MongoDB Node.js driver's MongoClient.connect() function. Mongoose does not modify the connection ...
Read more >
node.js - NodeJS Mongoose not working properly
I have a problem with NodeJS and Mongoose. The connection to the DB stands but I can't get any data from there.
Read more >
`mongoose.InferSchemaType` does not correctly infer nullable ...
When working with Mongoose schemas involving array fields that are nullable, mongoose.InferSchemaType does not seem to correctly infer the ...
Read more >
Accessing non-existent property 'count' of module exports ...
Looking at mongoose v5.9.13 package.json, it is importing the correct driver version. Also, based on a quick test with mongoose v5.9.13 and node ......
Read more >
How to Connect MongoDB to Node.js Using Mongoose
Mongoose provides a lot of functionality when creating and working with schemas. In this tutorial we will look at how to connect a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found