Why can I not pass this test on installing and connecting database

Tell us what’s happening:
Describe your issue in detail here.
I can’t connect it keeps saying timed out. I added mongoose and MongoDB and checked the dependencies. They are there. I didn’t alter the original code at all. The repo has changed, and there are bugs. Please fix them. :slight_smile:

Your project link(s)

solution: Glitch :・゚✧

Your browser information:

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

Challenge: Install and Set Up Mongoose

Link to the challenge:

You are not accessing the environment variable correctly. The property you created in the .env file is on process.env.

Review the Use the .env File lesson again.

It’s connected to the server, but the tests are not passing me. It’s still timed out even when I access the env file precisely like this.

The file name is .env not process.env

process.env is what you use in the code to access the variables set in the .env file.

I forked your project but it keeps giving some error about a module that isn’t part of the project (something used by Glitch). I suspect something broke when you added a file called process.env (or something is broken at least).

If I create a new project using the Github starter code and install the dependencies it passes all the tests using your code from your myApp.js file.

BTW, the point of the .env file is so you do not have the connection string with the name and password in the source code. I would suggest you remove the connection string after you have passed the test and use the .env file.

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