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

Tell us what’s happening:
Describe your issue in detail here.
I am getting timeout I can’t understand it. I am new to js.
I have tried with connection to MongoDB Compass and without it but the same result

Your app is listening on port 3000
GET
MongooseError: Operation people.insertOne() buffering timed out after 10000ms
at Timeout. (/home/runner/freecodecamp-mongomongoose/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:198:23)
at listOnTimeout (node:internal/timers:564:17)
at process.processTimers (node:internal/timers:507:7)
GET
mongodb is connected
MongooseError: Operation people.insertOne() buffering timed out after 10000ms
at Timeout. (/home/runner/freecodecamp-mongomongoose/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:198:23)
at listOnTimeout (node:internal/timers:564:17)
at process.processTimers (node:internal/timers:507:7)

Your project link(s)

solution: freecodecamp-mongomongoose - Replit

Your browser information:

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

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

Link to the challenge:

Your code is passing for me when I fork and use my own DB. Did you add the connection string to the Secrets?

You really shouldn’t be doing the backend part of the curriculum if you are new to JS. Do the JS section first.

1 Like

now worked it was a silly mistake I was making. but it took me 3 hrs to figure it out. That’s what happens when you are new to any other programming language.

bro I have done some JS before touching this part. thanks for your reply.