It might be because you are trying to use models before mongoose establishes a connection with the database. I too faced the same issue and was able to solve it by using async/await. You could check the details out in the following article. Hope this was helpful ✌️
I tried this, it didn't work. I keep getting the x.insertOne() error
It might be because you are trying to use models before mongoose establishes a connection with the database. I too faced the same issue and was able to solve it by using async/await. You could check the details out in the following article. Hope this was helpful ✌️
Solve "MongooseError: Operation 'x.find()` buffering timed out after 10000ms"
arunkc ・ May 16 ・ 3 min read