adrianhajdin/project_ai_mern_image_generation

.env file isn't working for me

AyushmanBhatt opened this issue · 4 comments

The dotenv (.env) file isn't working for me, it always shows the string is undefined.

make sure to not add and commit the files to git repository before adding .env and node_modules to .gitignore. Incase you do follow the process to remove them from repository.

Restart the server every time you update the env . Hence should fix it

dotenv.config({path : "./config.env"})

try this it's works for me

first check your pacage.json file. has dotenve file been installed or not .