MongoDB and Mongoose - Install and Set Up Mongoose

Tell us what’s happening:

can not connect using “mongoose”: “^5.6.5” asking for “mongoose”: “6 or upper version”

Your code so far

require('dotenv').config();

const mongoose = require('mongoose');

mongoose.connect(process.env.MONGO_URI,{ useNewUrlParser: true, useUnifiedTopology: true });

let Person;

const createAndSavePerson = (done) => {

done(null /*, data*/);

};

const createManyPeople = (arrayOfPeople, done) => {

done(null /*, data*/);

};

const findPeopleByName = (personName, done) => {

done(null /*, data*/);

};

const findOneByFood = (food, done) => {

done(null /*, data*/);

};

const findPersonById = (personId, done) => {

done(null /*, data*/);

};

const findEditThenSave = (personId, done) => {

const foodToAdd = "hamburger";

done(null /*, data*/);

};

const findAndUpdate = (personName, done) => {

const ageToSet = 20;

done(null /*, data*/);

};

const removeById = (personId, done) => {

done(null /*, data*/);

};

const removeManyPeople = (done) => {

const nameToRemove = "Mary";

done(null /*, data*/);

};

const queryChain = (done) => {

const foodToSearch = "burrito";

done(null /*, data*/);

};

/** **Well Done !!**

/* You completed these challenges, let's go celebrate !

*/

//----- **DO NOT EDIT BELOW THIS LINE** ----------------------------------

exports.PersonModel = Person;

exports.createAndSavePerson = createAndSavePerson;

exports.findPeopleByName = findPeopleByName;

exports.findOneByFood = findOneByFood;

exports.findPersonById = findPersonById;

exports.findEditThenSave = findEditThenSave;

exports.findAndUpdate = findAndUpdate;

exports.createManyPeople = createManyPeople;

exports.removeById = removeById;

exports.removeManyPeople = removeManyPeople;

exports.queryChain = queryChain;

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36

Challenge Information:

MongoDB and Mongoose - Install and Set Up Mongoose

Please Tell us what’s happening in your own words.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more you say, the more we can help!