MongoServerSelection Error: unable to get user cert

I finished all the exercises of advances nodejs an express , then download it install all the npm modules and when i try run in locally nodejs server.js
I get this error
MongoServerSelection Error: unable to get user cert
I wasn’t able to find any solution that helpen online
I am using Ubuntu/Linux btw.
Does anybody know how to solve this issue
in the process.env File MONGO_URI is the correct link to my MongoDB Cluster everything works fine in repl but when i run it locally on my PC ,
i get this Error Message
MongoServerSelection Error: unable to get local user cert

Can anybody please help ?

here is the link to the
repl: https://repl.it/@Levo96/NodeJs-and-Express-Basics-2-EDU#server.js

downloading the files onto your pc you need to install all the npm modules

does anybody have any clue why it shows this Error Message

Hey @LeVo96,

Repl.it usually does not let anyone but YOU see the .env file, but it lets other files that ends with .env and it also prevents anyone from downloading the .env file. The key is to make a file named .env yourself without anything in front it. Make sure the .env is in THE SAME directory as your server.js.

Hope this helps :slight_smile:

The problem is not with the .env file everythings is set up correct,
I get this error message :
MongoServerSelection Error: unable to get user cert
When trying to run the app locally on my Laptop,
Tried to search for an answer but nothing came out of it
Any body know how to solve this

Is that all the Error said? If not, can you please post the full error please.

Is the MongoDB Atlas Cluster has your IP whitelisted or at least it has 0.0.0.0 whitelisted for any access allowed into the cluster? I’m just trying to troubleshoot here…