Mongoose deprecated mongodb@2.2.16 : upgrade to 2.2.19 or higher?

Why do I keep getting this warning message below when I try to install mongoose ?

npm WARN is deprecated mongodb@2.2.16 : upgrade to 2.2.19 or higher

JSON:

{ "name": "dummy-app", "version": "0.0.0", "private": true, "scripts": { "start": "node ./bin/www" }, "dependencies": { "body-parser": "~1.15.1", "cookie-parser": "~1.4.3", "debug": "~2.2.0", "express": "~4.13.4", "pug": "~2.0.0-beta3", "morgan": "~1.7.0", "serve-favicon": "~2.3.0", "mongoose": "^4.7.6" } } 

How can i fix this?

+5
source share
1 answer

The npm mongodb is a mongoose dependency: it is automatically installed on npm when mongoose installed.

mongoose v4.7.6 depends on mongodb 2.2.16 (see its package.json file ), but there is a newer version of the bug fix (2.2.19), so you see a warning.

Since mongodb is a mongoose dependency, you have to wait until the supporting mongoose updates the dependency: this is not a problem that you have to fix in your code.

Actually this problem is already tracked in mongoose github here .

+8
source

Source: https://habr.com/ru/post/1262277/


All Articles