Im having trouble connecting to the mongo database. I think it’s because im installing it via windows, but trying to activate it from WSL2. Should I just switch to linux?!
Could not connect to MongoDB... Error: Invalid schema, expected `mongodb` or `mongodb+srv`
at module.exports (/mnt/c/dev/udemy/mosh-node/mongo-demo/node_modules/mongodb/lib/url_parser.js:15:21)
at /mnt/c/dev/udemy/mosh-node/mongo-demo/node_modules/mongoose/lib/connection.js:330:5
at new Promise (<anonymous>)
at NativeConnection.Connection.openUri (/mnt/c/dev/udemy/mosh-node/mongo-demo/node_modules/mongoose/lib/connection.js:329:17)
at Mongoose.connect (/mnt/c/dev/udemy/mosh-node/mongo-demo/node_modules/mongoose/lib/index.js:206:15)
at Object.<anonymous> (/mnt/c/dev/udemy/mosh-node/mongo-demo/index.js:3:10)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
➜ mongo-demo git:(master) ✗ npm list --depth=0
[email protected] /mnt/c/dev/udemy/mosh-node/mongo-demo
└── [email protected]