adrianhajdin / project_ai_mern_image_generation

Build and Deploy a Full Stack MERN AI Image Generation App MidJourney & DALL E Clone
https://jsmastery.pro
1.08k stars 302 forks source link

.env file isn't working for me #37

Open AyushmanBhatt opened 1 year ago

AyushmanBhatt commented 1 year ago

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

starlove54 commented 1 year ago

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.

LAKSHAYNE commented 1 year ago

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

yashwant1711 commented 1 year ago

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

try this it's works for me

Asifp6021 commented 1 year ago

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