Unable to upgrade mongodb version to 3.6

MongooseServerSelectionError: Server at localhost:27017 reports maximum wire version 5, but this version of the Node.js Driver requires at least 6 (MongoDB 3.6)

mongoose was installed using npm install mongoose@latest

unable to upgrade mongo db version using "npm install mongodb@latest". Mongo db version remains unchanged

@ShivaniSharma69 Welcome to the community!
How did you install MongoDB and how do you expect to update it?

I want to run standalone mongo db server using version 3.6 and above
But the default version in replit is 3.4 (That’s what I see when I run “mongod --dbpath data/db” on the shell )

How can I launch standalone mongo db server 3.6 version ? npm install mongodb@latest does not help

@ShivaniSharma69 Try npm upgrade mongodb or npm update mongodb.
Also is it mongoose or mongodb?

I just found this link “Upgrade to NixOS 23.05

Comment says “Also 22.11 comes with mongodb set to 3.4, non of the other versions work… 23.05 comes with 6.0.5. Current drivers for mongodb no longer work for versions below 3.6.”

So i did. the following

edited replit.nix

{ pkgs }: {
	deps = [

edited .replit 
channel = "stable-23_05"

My shell has been updating for the past 30 mins

Detected change in environment, reloading shell…
| Loading Nix environment…

@ShivaniSharma69 Could you invite me to your repl?

Invite sent
Please check if you received it

@ShivaniSharma69 I received it. I cannot help much now, but in about seven hours, I’ll be free again. So sorry!

I can reproduce this issue… all Mongodb packages in 23_05 cause a Replit bootloop.

In the meantime @ShivaniSharma69 you may be able to use 3.4 with an npm override hack