MongoDB and Mongoose - Install and Set Up Mongoose

Tell us what’s happening:

So, I have been getting this error on this task

// running tests
“mongoose version ^5.11.15” dependency should be in package.json (Test timed out)
“mongoose” should be connected to a database (Test timed out)
// tests completed

I’ve spent so much time on this already, what could be the error?

Your code so far

Here’s my code:

const mySecret = process.env[‘MONGO_URI’]


let mongoose = require(‘mongoose’);

mongoose.connect(mySecret, { useNewUrlParser: true, useUnifiedTopology: true});

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 11; TECNO LC7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Mobile Safari/537.36

Challenge: MongoDB and Mongoose - Install and Set Up Mongoose

Link to the challenge:

What is the public version of the code?


I just got this.

I solved the challenge already.

Thanks for offering help.

Bro how did you solve it man, you didnt leave a hint or anything c’mon


I can’t exactly remember the issue I had. I think it was with the" .env" file.

Maybe you should state the problem you’re facing and you’ll get help.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.