I am currently working on the register page for a hospital appointment management system using MERN stack. However, I encountered a problem in setting up MongoDB to store the data. My current MongoDB Compass version is 1.43.4.
When I tried to connect using the connection string for Compass version of 1.12 or later, this error occurred.
And this error occurred in the terminal.
So, I tried a solution that I found from Youtube, which I was required to choose the Compass version of 1.11 or earlier.
When I used this long version of connection in the Compass and in the .env file, the database connection was successful.
However, when I tried to register a user, this error occurred.
I hope someone can help me to solve this problem.