8

I am using mongodb with loopback and on successful connection I am getting below warning

Top-level use of w, wtimeout, j, and fsync is deprecated. Use writeConcern instead.

loopback version: 5.5.0

How to get rid of this? Kindly help

2 Answers 2

5

Apparently this warning was introduced in Mongo Driver v3.6.4 so the basis solution will be to down grade to v3.6.3. There is a PR that try to stop the warning outputs, and also a report on the Jira for the Node Driver. https://jira.mongodb.org/browse/NODE-3114

Update: The problem have been fixed with the version 3.6.5

8
  • Thanks... So warning will be removed the next mongodb version. Right?
    – Profer
    Feb 26, 2021 at 7:55
  • 1
    @Profer The problem should be fixed, i will keep this post updated about it. Feb 26, 2021 at 13:33
  • I see this same exact warning suddenly popping out of no where Mar 3, 2021 at 15:21
  • Hey how to update to version 3.6.5? Still showing me the latest version is 3.6.4.
    – Adam
    Mar 11, 2021 at 9:04
  • 1
    No matching version found for mongodb@3.6.5
    – 1nstinct
    Mar 11, 2021 at 17:45
4

Pass the following options

mongoose.connect(process.env.MONGO_URI, { 
  useNewUrlParser: true,
  useFindAndModify: false,
  useUnifiedTopology: true,
  useCreateIndex: true 
})
1
  • Welcome to Stack Overflow. Dear @Unpredict2ble please answer questions with more details. Thanks! Apr 3, 2021 at 6:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.