MongoDB and Mongoose - Install and Set Up Mongoose
i am getting the mistake: // running tests
“mongoose” should be connected to a database
// tests completed and i can’t fix it. i ve tried chainging from ‘’ to “” and habing none on the .env file and even just copying the mongodb link but still didnt work, how can i fix this issue?
here is the link: https://freecodecam-boilerplate-r4u7urb3h31.ws-eu108.gitpod.io/
i haven’t changed the code, and today i tested again to see if it passed or not but it didnt, and showed a new error: “mongoose version ^5.11.15” dependency should be in package.json and the previous one, but my package.json has the right version, code: {
“name”: “fcc-mongo-mongoose-challenges”,
“version”: “0.0.1”,
“description”: “A boilerplate project”,
“main”: “server.js”,
“scripts”: {
“start”: “node server.js”
},
“dependencies”: {
“body-parser”: “^1.15.2”,
“dotenv”: “^8.2.0”,
“express”: “^4.12.4”,
“mongoose”: “^5.11.15”
},
“repository”: {
“type”: “git”,
“url”: “GitHub - freeCodeCamp/boilerplate-mongomongoose: A boilerplate for the freeCodeCamp curriculum.”
},
“keywords”: [
“node”,
“mongoose”,
“express”
],
“license”: “MIT”
}