Installing and settingup mongoose....stuck for the last six hours

Tell us what’s happening:
Describe your issue in detail here
everytime i run my replit i get this error message from my console
(Protocol and host list are required in “mongodb+srv://IanMuthwa:passwordchanged@cluster0.6ckuw.mongodb.net/myFirstDatabase?retryWrites=true&w=majority”)

My key
MONGO_URI

My key value
mongodb+srv://IanMuthwa:!gKypasswordchanged@cluster0.6ckuw.mongodb.net/myFirstDatabase?retryWrites=true&w=majority

Your project link(s)

solution:boilerplate-mongomongoose-2 - Replit

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.82 Safari/537.36

Challenge: Install and Set Up Mongoose

Link to the challenge:

You can’t use the .env file on Replit (and the sample.env is just that, a sample)

The Use the .env File challenge tells you how to do on Replit.

Note: If you are using Replit, you cannot create a .env file. Instead, use the built-in SECRETS tab to add the variable.

I had already set my secret name and variable. it worked after I created and used another mongodb account

thank you for your help

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.