Tell us what’s happening:
Hello!
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’]
require(‘dotenv’).config();
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/104.0.0.0 Mobile Safari/537.36
Challenge: MongoDB and Mongoose - Install and Set Up Mongoose
Link to the challenge: