MongoDB and Mongoose - version in package.json

this challenge:
The instructions do not specify what to set for the value of the mongo and mongoose keys under the dependencies in the package.json

challenge

I also want to know if i have to export the MONGO_URI variable from the env file and require it in order to use it in myApp.js because its telling me that the variable is undefined.

Glitch App

@kravmaguy

Yes, you are expected to export the MONGO_URI out and use it inside myApp.js

Ok i did all that however its still causing me issues. can you please reconsider:

The instructions do not specify what to set for the value of the mongo and mongoose keys under the dependencies in the package.json

reason being i have no idea what to put for version, there are errors in the console that it cant find the modules. I ran npm i in the terminal and it said:

No matching version found for mongodb@^3.4.13

I just found some random version numbers and copied whatever i found online.

Good day @kravmaguy,

You can delete the node_modules folder and run npm install

im not sure what you mean DELETE node modules folder, I dont see any folder titled ‘node modules’ folder.

like i said im trying to run npm install and its telling me there is no such thing as that mongo version I specified. why doesnt the challenge just specifiy what version we are supposed to include?

can you please have a look at this and tell me what im doing wrong?

I have just asked to join the project.

I will see from there on how best I can help.

1 Like

ok well i see the first thing its unhappy about is that i didnt give a password

I just included the password that i got from cloud.mongo.com, but its still not working. { Error: Cannot find module ‘mongoose’
what did you mean when you said delete the node modules folder? where is a folder titled ‘node modules?’

npm ERR! code ETARGET
npm ERR! notarget No matching version found for mongodb@^3.4.13
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn’t exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of ‘fcc-mongo-mongoose-challenges’

It should work fine now that you run npm install

still errors in console. still not passing the challenge…
what did you attempt to do?

unfortunately still not passing. what should we do?

its not happy about this line:
import MONGO_URI from '.env'

I tried to follow your advise… but it does not work

this challenge is frustrating, I believe the instructions are incomplete. they do not specify what needs to be done, I found a thread on freecodecamp and im trying out some of the things:
I changed :
"mongoose": "*", "mongodb": "*"

I also changed some other things around… I found this on another thread, this user claims you cannot have a $ in your password:

iarobinson

Jul '18

I had a problem in that my password used a key that wasn’t supported in the .env file. That character was one of these = !@#$%^&*()

do you think this is the problem?

It is very frustrating at times.

Which challenge is it ?

the one were talking about right now, the first challenge set up mongoose and mongo or whatever its called

Can you try to give it a very simple password instead of those characters?

ok how do I reset it do I have to go back to the cluster gui ? what do I do to reset it? I followed these instructions, they are incomplete:

Before trying to reset it, check again if you still have errors.

I have put the URI in the api file and it seems to run it now.
I added {useNewUrlParser: true}

should i just make a new user with a new password?
this challenge is confusing. not clear instructions.