Tests not passing from repl.it

Tell us what’s happening:

I am trying to do the MongoDB tutorial, but can’t pass the first challenge. It is not seeing the dependencies in my package.json or that I’m connected to mongodb.

I know that my code is right because I can see sample stuff up in the database.

I have tried pasting both

https://repl.it/@CactusWren2020/GiftedLankySoftwaresuite#myApp.js

and

https://GiftedLankySoftwaresuite--five-nine.repl.co

in the Solution Link input and neither works.

Your code so far

var express = require('express');
var app = express();

const mongoose = require('mongoose');
 
mongoose.connect(process.env.MONGO_URI, { useNewUrlParser: true, useUnifiedTopology: true });

/*const Cat = mongoose.model('Cat', { name: String });

const kitty = new Cat({ name: 'Meowster' });
kitty.save().then(() => console.log('meow'));
*/

{
	"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.3",
		"mongoose": "^5.10.13",
		"fcc-express-bground": "https://github.com/freeCodeCamp/fcc-express-bground-pkg.git"
	},
	"main": "server.js",
	"scripts": {
		"start": "node server.js"
	},
	"engines": {
		"node": "4.4.5"
	}
}

Your browser information:

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

Challenge: Install and Set Up Mongoose

Link to the challenge:

you need to submit this, but also your program must be running at that time

Hm, so I am submitting that link, the program is running, I can see the three console logs from FCC, but all my tests are failing.

Any ideas?

no, I have not reached this part of the curriculum yet - maybe check the console for any error

the console has three errors:

Well, I started from scratch and made a new boilerplate. Weirdly, the new boilerplate looks totally different from the first one. I wired it up and passed the first set of tests.

I guess the take-home is, if it doesn’t work, just start from scratch and maybe the boilerplate will be right this time?

have to admit I’m a bit confused.

ah, it may be that you have found yourself in the middle of project updates…

1 Like