.env is not available

May I ask why my .env is out of order and I cannot use process.env.token

Then for some reason I can’t post the link to the file

It is not recommended to use .env files in the Replit. Secrets should be used instead. Perhaps that’s why you are having these errors.

7 Likes

I believe Replit prevents use of .env files as a security measure, so bad actors can’t get ahold of your API keys and etc.

You should use environment variables instead like @KAlexK suggested.

7 Likes