Install & Setup Mongoose

I followed the solution to the t in replit, but did not pass the specs at all. If anyone can help. Thank you.

test results:

"mongodb" dependency should be in package.json
"mongoose" dependency should be in package.json
"mongoose" should be connected to a database

my reference for setting database in mongodb:


my input in replit, and yes, always stop and run after each change.

.env in replit (secret)

key field: MONGO_URI
value field: "mongodb+srv://"


	"name": "fcc-learn-node-with-express",
	"version": "0.1.0",
	"dependencies": {
		"express": "^4.14.0",
		"body-parser": "^1.15.2",
		"cookie-parser": "^1.4.3",
		"mongodb": "^3.6.0",
		"mongoose": "^5.4.0",
		"fcc-express-bground": ""
	"main": "server.js",
	"scripts": {
		"start": "node server.js"


const mongoose = require('mongoose');
const mongo = process.env['MONGO_URI'];

Your project link(s)


Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36

Challenge: Install and Set Up Mongoose

Link to the challenge:

I saw my mistake, I should use the specific given replit. Managed to pass the first two specs, but still can’t pass the third spect/connect to database.

I forked your repo and was able to pass using my mongo uri.
So maybe it is an issue with your mongo uri.

I know people in the past have had issues passing this test if there username or password had special characters in it.
So that might be the issue.

Thanks. It’s not the case. I always created simple password username for toying around. Please let me know if you saw something I missed here. Thank you.

You want to remove the quotes from the value.

But even when I fix that, I am still getting authentication errors for your uri.
I googled the error message and there was stackoverflow answer addressing it.

You can try the solutions provided in that thread.

You can also try my throwaway test uri and see if that works.


Great! It’s removing the double quotes! Thank you so much!

1 Like

Thank you @jwilkina.oboe, you just save my laptop from throwing away ! :joy:


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