Unable to access session's secret key value from the .env file

Tell us what’s happening:
Unable to create .env file in repl.it. Hence, unable to get the defined variables. And even unable to access variables in the already existing “sample.env” file and the main issue is that unable to get the value for “SESSION_SECRET” variable stored in the “sample.env” file. I had to give the session’s secret key a value directly in my main “server.js” file.

Please suggest me if there are any possible solutions.

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/86.0.4240.111 Safari/537.36 Edg/86.0.622.51.

Challenge: Set up Passport

Link to the challenge:

Hello there,

If you have forked the repo/repl, and are signed into Repl.it, there should be no reason you are unable to create a .env file.

Why can you not create one?

Thanks for the reply.
I got the issue resolved by changing the config for the —> require('dotenv').config() to a named .env file at another location by passing an object to config() function and specifying the path key with the string of the path of my named .env file.
This solved the whole issue. :grinning: