Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 46 additions & 4 deletions backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"cors": "^2.8.5",
"dotenv": "^16.6.1",
"express": "^4.21.0",
"mongodb": "^5.7.0",
"mongodb": "^5.9.2",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This upgrade introduces a second version of the mongodb package into your dependency tree. Your project now depends on mongodb@^5.9.2 directly, but the mongoose@7.6.11 dependency has a strict requirement for mongodb@5.9.1.

As a result, npm will install both versions, which can lead to subtle bugs and unexpected behavior at runtime (e.g., instanceof checks failing, or issues with connection pooling if different driver instances are used).

To resolve this and ensure a single version of mongodb is used throughout the project, I recommend using npm overrides. Since this is a patch version upgrade, it's highly likely to be compatible. You can add the following to your package.json:

"overrides": {
  "mongodb": "^5.9.2"
}

After adding the override, run npm install to update your package-lock.json file. This will force mongoose to use mongodb@^5.9.2 as well, resolving the conflict and removing the nested mongodb dependency.

"mongoose": "^7.6.11",
"nodemon": "^3.0.1"
}
Expand Down