burakorkmez / twitter-clone

MIT License
269 stars 60 forks source link

Error connection to mongoDB #6

Open Sitholezw opened 2 months ago

Sitholezw commented 2 months ago

@burakorkmez This is how the error reads

The uri parameter to openUri() must be a string, got "undefined". Make sure the first parameter to mongoose.connect() or mongoose.createConnection() is a string.

PY-SENSEI commented 2 months ago

@Sitholezw it simply means that ur connections string has error. please check your mongodb connections string and check for the error.

PiyushGaur09 commented 1 month ago

A simple way to fix this is to put your connection URL in double quotes like mongoose.connect("URL") and this will fix your issue