question-mark
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.

Mongodb DeprecationWarning

See original GitHub issue
  • mongodb version:3.2.10

  • express-session version:1.16.2

  • connect-mongo version:3.0.0

  • I found that connect-mongo triggered the warning。

  • express server started with warning:

(node:494260) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to MongoClient.connect.

Part of code:

        app.use(
            session({
                secret: this.session.secret,
                cookie: {
                    httpOnly: true,
                    maxAge: 1000 * 60 * 60
                },
                resave: true, 
                saveUninitialized: false,
                store: new MongoStore({
                    url: this.session.dbUrl
                })
            })
        );

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:16

github_iconTop GitHub Comments

2reactions
ghostcommented, Oct 18, 2019

any idea when this is going to be pushed to NPM? The NPM package hasn’t been updated yet, so users downloading from there still receive the deprecation warning.

2reactions
HelloKevinTiancommented, Aug 20, 2019
  1. Please edit your title, do not post the whole error message as the title
  2. Don’t assume everyone knows Chinese here (fortunately I do but not everyone in here). Please try to submit your issue in English

Thank you with your advise

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mongoose v6.8.1: Deprecation Warnings
The MongoDB server has deprecated the count() function in favor of two separate functions, countDocuments() and estimatedDocumentCount() . DeprecationWarning: ...
Read more >
MongoDB mongoose Deprecation Warning - Stack Overflow
Mongoose 5.2.9 version upgraded the native mongodb driver to 3.1.3 in which changes ... DeprecationWarning: collection.remove is deprecated.
Read more >
Listening to events on the Db class has been deprecated and ...
Got this deprecation warning on Node v14.15.3 and Mongo v4.4.3. Is it safe to ignore? (node:44612) DeprecationWarning: Listening to events ...
Read more >
PromiseLibrary deprecation warning - Drivers & ODMs
Hello, I'm using mongodb node.js driver version 4.1.2 and I want to specify bluebird as a promise library so I add this to...
Read more >
Deprecation Warnings Using Node Driver - MongoDB
I'm currently testing all of this by getting the databases, logging that, then setting the database and logging it. The errors I'm getting...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found