Getting error upon await client.connect() in node.JS

@Tatiana_Wiener - Thank you so much for the additional information and context - it’s so helpful! :smiling_face_with_three_hearts:

Looks to me to be an async issue. You are calling a MongoDB methods before you have connected to the MongoDB cluster in your main method. It’s not shown in your code where you are actually invoking the replace method, but this function is being called too soon. You need to make sure this gets invoked after connecting to your MongoDB cluster. Do you have a link to the GitHub repo or could you show me where/how you are invoking the replace method? My gut is telling me that’s where the issue most likely lives.

Again, thank you so much for posting! I hope we can get this problem sorted out soon! :heart: