Can not create .env file in Replit

Tell us what’s happening:
Describe your issue in detail here.
I cant 't pass the test of the .env file in Node and Express Basics because Replit does not allow me to create a .env file and it says to me “You can create environment variables via environment variables sidebar! (.env file are deprecated)”. Please help me.

Your code so far

Your browser information:

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

Challenge: Use the .env File

Link to the challenge:

Hi,

Until recently you could create an .env file but replit has changed this and the freecodecamp instructions have not been updated yet.
So what you have to do is click on the lock icon where secrets are stored. There you can fill in key value pairs like PORT = 3000. This replaces the .env file.
There have been other posts about this subject:(mine:))

Greets,
Karin

Welcome there,

There is a note at the bottom of the challenge instructions:

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

If you are unsure how to use Replit, I encourage you to read Replit’s docs: https://docs.replit.com/

Hope this helps

1 Like

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