To the Freecode Camp Team

please at the backend course(basic node and express) at the .env challenge . i think we need to mention that camper must install dotenv package which not mentioned at the challenge and it can cause problems.
thank you

Welcome there,

The dontenv package is not needed for developing in Replit (the currently recommended method), and is only needed in some environments.

That is to say, if you choose to develop in a different environment, it is up to you to find out what is needed to work with the tools. The boilerplate is made to be as bare-bones as possible.

Hope this helps

1 Like

I don’t really think it is unreasonable in a challenge that is supposedly teaching about using the .env file that it is mention how to use it. I also wouldn’t mind a mention of .gitignore as well. Or a link to a more in-depth fCC article would be nice.

The boilerplate response I see often give that people can just figure it out on their own seems just a little odd coming from a teaching site. I mean I agree, people should do their own research and not just depend on us, or expect to be spoonfed everything, but still, we are after all one such place people go to learn.

1 Like

maybe because i started with azure … and firstly i have no idea about dotenv … so i didn’t figure out where is the problem came from xD and just get stuck a while until i konw about dotenv.
anyways thank you

that’s it …
i am a beginner to the subject and i did follow every step but tests wouldn’t pass successfully that’s why i mentioned that .

There is also the wrinkle that replit itself has their own “secrets” feature that can essentially remove the need for a .env file on that platform.

This is also a feature that was recently added only a few months ago, to the point I’ve seen a good portion of confusion in regard to Discord bot development videos being outdated only a few months later due to this platform change. I’m not 100% sure if by default replit manages .env files, as I don’t actively use it enough to be sure.

platform-docs: Replit Docs - Secrets and environment variables

If you try to create a .env file on Replit it won’t let you and guides you to use the secrets tab.


They initially said it was just deprecated but I guess feature deprecation is supposed to lead to removal so its removal does make sense. Not sure what happens if you import a repo with a .env file they might still have some legacy support for it but I’m not sure (didn’t test it).

The challenge talked about in this thread does have a message at the bottom that makes it clear.

Note: If you are using Replit, you cannot create a .env file. Instead, use the built-in SECRETS tab to add the variable.

I do agree with all.

The backstory is effort was specifically made to remove dotenv from all/most boilerplates, because it has broken functionality in the past. Specifically, I know there was an issue with it and Replit, at one stage, which is why I assume it was remove from this topic in question’s boilerplate.

A large part about the new curriculum is moving to resolve common issues/confusion we have had in the past about this, which is why we have specific lessons upcoming for NPM, Node, Git, GitHub.

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