arashsheyda / nuxt-mongoose

A Nuxt module for simplifying the use of Mongoose in your project.
https://docs.arashsheyda.me/nuxt-mongoose
69 stars 11 forks source link

Depreciation Warning Mongoose Strict Query #55

Closed devniza closed 2 months ago

devniza commented 2 months ago

I get the following warning error whenever my application connects to MongoDB via nuxt-mongoose. I am still able to connect and perform actions to the database, but I keep on getting this and I do not know how to disable it in the nuxt config.

How do I fix this error out of my log stream? image

Nuxt Config image

[MONGOOSE] DeprecationWarning: Mongoose: the strictQuery option will be switched back to false by default in Mongoose 7. Use mongoose.set('strictQuery', false); if you want to prepare for this change. Or use mongoose.set('strictQuery', true); to suppress this warning. (Use node --trace-deprecation ... to show where the warning was created)

arashsheyda commented 2 months ago

@devniza can you share a small reproduction? (we are using mongoose 8 and I'm not sure why are you getting this warning)

devniza commented 2 months ago

Hi, apologies for the late response. I managed to fix the error by simply running pnpm i mongoose to update it to the latest version.