Mongodb - I can't get tests to pass

Tell us what’s happening:
I’m getting error

// 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

even if I copy solution from ‘Get hint’
The test is not seeing my mongodb and mongoose line in package.json

Your code so far
https://petite-aquatic-bosworth.glitch.me

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0.

Challenge: Install and Set Up Mongoose

Link to the challenge:

Hello there,

Some things I noticed:

  1. You are console.log-ing the connection to the db. This is not the way you can find out if the connection is successful.
  2. You have not included the necessary options for the connection: { useNewUrlParser: true, useUnifiedTopology: true }
  3. Whenever you click submit on the challenges, ensure Glitch has your Live Preview running in the background, and it does not need to be woken up.
  4. That is not the boilerplate code for this project. If you were presented with a blank project after clicking on the link, click on it again until you get a project with a lot of writing and instructions.

Hope this helps

1 Like

Yes, changing to the correct boiler plate solved the problem. Most likely that was the reason why it didn’t work.

Thank you for your help!