Code Monkey home page Code Monkey logo

Comments (14)

JonasTheGamer avatar JonasTheGamer commented on July 17, 2024 3

Well, hm. Here's an uninteresting fix. If you:

  • install monk npm install monk
  • install [email protected], @3.6.5, or later deliberately npm install mongodb
  • uninstall monk npm uninstall monk
  • install monk npm install monk

The errors do not appear. I have absolutely no idea how this fixes the problem, but uh, it does. Maybe NPM is doing some wacky cacheing.

Hi! I tried this but I'm still receiving the warning. I tried all other solutions above as well... Anyone who found a fix yet?

from monk.

mcasto avatar mcasto commented on July 17, 2024

Prompted to come here for this same issue.

from monk.

cutratefuture avatar cutratefuture commented on July 17, 2024

https://stackoverflow.com/questions/66190532/deprecationwarning-listening-to-events-on-the-db-class-has-been-deprecated-and

TEMP Fix.
you must remove current mongoose version (I was on 5.11.13), and downgrade to [email protected], to resolve it.

from monk.

zkldi avatar zkldi commented on July 17, 2024

This is fixed with mongodb version 3.6.5.

This can also be fixed with npm i [email protected], as that version is before the bug occured.

Given that this isn't an issue with monk and is resolved downstream, this is probably safe to close?

from monk.

fortezhuo avatar fortezhuo commented on July 17, 2024

I have tried to install [email protected] and 3.6.6 but the deprecation warning still be exist..
And originally why I open the issue, I think this deprecation may cause problem in the next release if monk library is not patched / fixed

And I have found monk library also have own mongodb version. So which mongodb version that we install to our project, monk will use its own mongodb version
image

from monk.

zkldi avatar zkldi commented on July 17, 2024

And I have found monk library also have own mongodb version. So which mongodb version that we install to our project, monk will use its own mongodb version

This is not how NPM works.

Monk specifies "mongodb": "^3.2.3",, which means any version of mongodb greater than or equal to 3.2.3, but NOT 4.x.x.

This means that if you explicitly install a version of mongodb in your project, monk will use that version of mongodb, provided that the version you install is after 3.2.3.

from monk.

fortezhuo avatar fortezhuo commented on July 17, 2024

@zkldi
Please check it out this simple repo https://github.com/fortezhuo/monk_dummy
The repo only contains mongodb 3.6.3 and monk 7.3.3

{
  "name": "monk_dummy",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "dependencies": {
    "mongodb": "3.6.3",
    "monk": "^7.3.3"
  }
}

image

I used to use yarn and found monk still use [email protected]. I think the problem may be caused by yarn.

Yarn Version : 1.22.10

from monk.

zkldi avatar zkldi commented on July 17, 2024

Strange, this has started breaking for me again. Nothing has changed with the versions installed, either.

from monk.

zkldi avatar zkldi commented on July 17, 2024

Well, hm. Here's an uninteresting fix. If you:

  • install monk npm install monk
  • install [email protected], @3.6.5, or later deliberately npm install mongodb
  • uninstall monk npm uninstall monk
  • install monk npm install monk

The errors do not appear. I have absolutely no idea how this fixes the problem, but uh, it does. Maybe NPM is doing some wacky cacheing.

from monk.

fortezhuo avatar fortezhuo commented on July 17, 2024

I solved this problem with silly solution, I had cloned monk library, downgrade mongodb to 3.6.3, and allow lib to be hosted on github. So I use the cloned monk on my project

"monk": "fortezhuo/monk",

from monk.

FranciscoMendes10866 avatar FranciscoMendes10866 commented on July 17, 2024

I have exactly the same problem. Is there already a solution?

from monk.

Black-Platypus avatar Black-Platypus commented on July 17, 2024

Why isn't Monk just using the new paradigm?
https://www.mongodb.com/community/forums/t/node-44612-deprecationwarning-listening-to-events-on-the-db-class-has-been-deprecated-and-will-be-removed-in-the-next-major-version/15849/4

from monk.

JonasTheGamer avatar JonasTheGamer commented on July 17, 2024

It's a shame that we have not received any reply from the developers of this framework, stating how to resolve this issue or at least letting us know they are working on it.

It's a pain in the ass when you're debugging your program and all you see is that you're being spammed by these errors.

Someone, please tell me how to disable these errors, I don't care if they're just ignored or if the code is fixed, I JUST DONT WANT TO SEE THEM. Thanks.

from monk.

RogthatSinatra avatar RogthatSinatra commented on July 17, 2024
  • npm install monk

This worked for me. i almost collapsed fixing this bug

from monk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.