Advanced Node and Express - Clean Up Your Project with Modules | "Modules should be present" error

Tell us what’s happening:

“Modules should be present” error.

My code is working for all of the functionalities and I’ve tried moving some stuff around to better match the example code, but I’m still not passing the check. I do have comments in my code so I’m wondering if that is messing with the regex used to test the solutions.

Thanks for any help!

###Your project link(s)

solution: https://freecodecam-boilerplate-aqxaahqg3ei.ws-us114.gitpod.io

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36

Challenge Information:

Advanced Node and Express - Clean Up Your Project with Modules

The solution link doesn’t work, if you can, provide a public GitHub repo instead.

Thanks for getting back!
Here is a link to the github:

For the code to run you will need to add a .env file or rename the sample.env. From there you can replace the session secret with some random numbers and create a quick, free mongo database and add the URI.

Thanks again for any help!

I don’t know, it passed for me after fixing up my environment file. Are you sure your server was running when you submitted and you submitted the correct link? You don’t see any errors in the Node console or browser console for the app? I did this locally, so if you’re using GitPod maybe try to get passed it running locally if you can?

I’ll remark this project is further than I am in the curriculum but I thought trying to take a look can’t hurt, but since it works for me I’m at a loss. I’m used to seeing/using module export statements at the very bottom of files, you could try moving all of those down to the bottom??

Thanks for taking a look. I’ll try out the local version. The only error I’m getting in the console is something about the Mongo url being depreciated, but it writes just fine. Wondering if that’s throwing off the test somehow.

Works now for some reason, thanks for checking things out either way!

1 Like