Https://www.freecodecamp.org/learn/apis-and-microservices/mongodb-and-mongoose/install-and-set-up-mongoose

Tell us what’s happening:
“mongodb” dependency should be in package.json (Test timed out)

Your code so far

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

var mongoose = require('mongoose');
const bodyParser = require("body-parser");
const paths = __dirname + "/views/index.html";
app.use(express.static(__dirname + "/public"));


mongoose.connect(process.env.MONGO_URI);

and i have setup the same thing for .env which is given in hint

Your browser information:

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

Challenge: undefined

Link to the challenge:
https://www.freecodecamp.org/learn/apis-and-microservices/mongodb-and-mongoose/install-and-set-up-mongoose

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

Note: Backticks are not single quotes.

markdown_Forums

Did you do this:

Add mongodb and mongoose to the project’s package.json.

Are you doing this project on glitch? If yes, you can post the link here so we can see your full project code.

yes both are there

is it accessible ?

yes thanks I’m checking it now.

// running tests
“mongodb” dependency should be in package.json
“mongoose” dependency should be in package.json
“mongoose” should be connected to a database
// tests completed

im getting above

On your Glitch project, do you see any errors in the log?

How to check that , from where i can see the logs?

YES I GOT SOME ERROR
.env: line 11: be: command not found

10:44 PM

internal/modules/cjs/loader.js:584

10:44 PM

throw err;

10:44 PM

^

10:44 PM

10:44 PM

Error: Cannot find module ‘fcc-express-bground’

10:44 PM

at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)

10:44 PM

at Function.Module._load (internal/modules/cjs/loader.js:508:25)

10:44 PM

at Module.require (internal/modules/cjs/loader.js:637:17)

10:44 PM

at require (internal/modules/cjs/helpers.js:22:18)

10:44 PM

Jump Toat Object. (/app/server.js:6:15)

10:44 PM

at Module._compile (internal/modules/cjs/loader.js:701:30)

10:44 PM

at Object.Module._extensions…js (internal/modules/cjs/loader.js:712:10)

10:44 PM

at Module.load (internal/modules/cjs/loader.js:600:32)

10:44 PM

at tryModuleLoad (internal/modules/cjs/loader.js:539:12)

10:44 PM

at Function.Module._load (internal/modules/cjs/loader.js:531:3)

10:44 PM

10:44 PM

:beetle: The debugger could not be started. See https://glitch.com/faq#debugger

Did you add this to the server.js file? (line 6)
var bGround = require('fcc-express-bground');

it was there only …

I wonder if FCC isn’t in the process of changing this challenge at this moment. Because now the link to the starter Glitch project is just to a blank project.

Plus, what your starter project looks like is different to mine. (I did this section a few weeks ago.)

I don’t think this is a problem with the code you’ve written. Maybe FCC is updating something, or something has gone wrong.

1 Like

Correct You are right
i just clicked

now its completely empty nothig is there instead of assets folder

Do you know how to use git/github? Instead of using Glitch you can still clone the repo from Gitthub. Maybe that will work.

Yes im femilier with that

I just figured out how to clone the repo back to Glitch, if you want to keep working on Glitch.
This is the link: https://glitch.com/edit/#!/blush-tick

I think you can just click remix and start your own project.

1 Like

Things looks good
but now even im getting GET in console
FCC side im getting
// running tests
“mongoose” should be connected to a database
// tests completed

Can you share your code again?

const mongoose = require(‘mongoose’);
mongoose.connect(process.env.MONGO_URI);