MongoDB and Mongoose - Create a Model

Tell us what’s happening:

I have completed all the requirements of the question and still it is giving an error saying:
[Error: Cannot read properties of undefined (reading ‘modelName’)]

//here is the section of code
let personSchema = new mongoose.Schema({
name: { type: String, required: true },
age: { type: Number, required: true },
favoriteFoods: [String]
});

const Person = mongoose.model(‘Person’, personSchema);

###Your project link(s)

solution: https://43b9fe07-0022-4dca-98c5-060f53ce81ba-00-1ey5s4ox8ptez.kirk.replit.dev

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36

Challenge Information:

MongoDB and Mongoose - Create a Model

Link to the editor so we can see your code.

Do you still have the exports at the bottom of the file? It sounds like the model isn’t being exported.