MongoDB and Mongoose - Create and Save a Record of a Model

Tell us what’s happening:

i keep submitting and it keeps failing, i could not use the document.save() method because it is no longer supported, i used an async/await function and i receive response in the console that the document has been created and yet i am not passing the test

###Your project link(s)

solution: http://localhost:3000

Your browser information:

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

Challenge Information:

MongoDB and Mongoose - Create and Save a Record of a Model

open the browser console when you submit, look for the errors there

1 Like

I have checked it and what I am seeing there is an error which says “Model.findById() no longer accepts a callback”

those are all errors that you need to solve

you may need to downgrade some package versions

1 Like

I don’t know which ones, can you please give me a hint

I am not sure, which one has Model.findById()?

1 Like

Mongoose I think
I’ll try that, thanks

Thanks, that helped
I downgraded it to version 6.0.0 and it worked
I’m very grateful man