MongoDB and Mongoose - Install and Set Up Mongoose

Tell us what’s happening:
Describe your issue in detail here.


my code is correct but it is not running the code uri perimiter to open uri must be string erroer message please help t
Your project link(s)

solution: boilerplate-mongomongoose-26 - Replit

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0

Challenge: MongoDB and Mongoose - Install and Set Up Mongoose

Link to the challenge:

You may want to define the MONGO_URI as described in the challenge:

Note: If you are using Replit, you cannot create a .env file. Instead, use the built-in SECRETS tab to add the variable. Do not surround the values with quotes when using the SECRETS tab.

You can also include a console.log debug statement to print the value of the process.env.MONGO_URI to verify that the value is there.

how to add the variable give somr example

yes i put the value in .env folder but still not reaponding
MONGO_URI=‘mongodb+srv://password:sumee@usefulprogramer.h3ihqmp.mongodb.net/sumeet?retryWrites=true&w=majority’

In your Replit, there is a SECRETS tab (it looks like a lock)., under the Files - use that to add the variable.

ok i try this method


new error is come

sur please help me new error come

The error looks related to the MONGO_URI. Make sure there are no quotes (') surrounding the URI value.

ok i remove my cotasion marks of file

“mongoose version ^5.11.15” dependency should be in package.json (Test timed out)
“mongoose” should be connected to a database (Test timed out) new err

Are you seeing any error messages in the browser console when you submit your url? Also, what url are you submitting for the challenge?

yes sir
please help me

Can you show the browser console after you submit the url?

Also, try stop and restarting the server (clicking Stop and then Run again).

ok


That is your Node console. I want to see your browser console.

That error message in the Node console could mean you are you using the wrong credentials for the database. You should be using the username and password you created for the cluster and should not be using the username and password for your Mongo Atlas account.

but sir watch this sir

Like I said in the previous post, you need to make sure you are using the correct username and password.

Also, when the Run button shows, that means the app is not running, so you will not pass the tests when that occurs.

One last thing, you still have not shown me the browser console, but since the app is not running, it will not make any difference.

sir my test is get pass thanks for guid me