Install and Set Up Mongoose (I am confused)

Tell us what’s happening:

Your code so far

# Environment Config

# store your secrets and config variables in here
# only invited collaborators will be able to see your .env values

# reference these in your code with process.env.SECRET
# note: .env is a shell file so there can't be spaces around =
# The entire url should be surrounded by single quotes

Your browser information:

  "name": "fcc-mongo-mongoose-challenges",
  "version": "0.0.1",
  "description": "A boilerplate project",
  "main": "server.js",
  "scripts": {
    "start": "node server.js"
  "dependencies": {
    "body-parser": "^1.15.2",
    "dotenv": "^8.2.0",
    "express": "^4.12.4",
    "mongodb": "^3.0.0",
    "mongoose": "^5.6.5"
  "engines": {
    "node": "4.4.5"
  "repository": {
    "type": "git",
    "url": "!/project/welcome-project"
  "keywords": [
  "license": "MIT"

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


/* ================== */

/** 1) Install & Set up mongoose */

const mongoose = require('mongoose');


Challenge: Install and Set Up Mongoose

Link to the challenge:

Hello there,

For future posts, please use the Tell us what’s happening section to ask a question/tell us what is happening.

Otherwise, I can see you are defining mongoose, and connecting to your database, below all of the exports. The exports in myApp.js should be the last lines of the script.

Hope this clarifies

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.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

as i read your .env file, it looks like your MONGO_URI variable does not contain your database user credentials.
Have you setup your MongoDB on Atlas as explained from the tutorial in the challenge? It does skip the part you need to create a user iirc, to receive a link which contains its id and pass

Hi, I made an attempt on installing it and the whole installation is not clicking to me. if you could get someone to help me one on one and step by step that would be great.

check out this video, i think it should help you figure it out

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