toddbluhm / env-cmd

Setting environment variables from a file
https://www.npmjs.com/package/env-cmd
MIT License
1.73k stars 65 forks source link

Error: Failed to find .env file at path: ./.env .development at getEnvFile (/app/node_modules/env-cmd/dist/get-env-vars.js:40:19) #334

Closed AngelHadzhiev closed 2 years ago

AngelHadzhiev commented 2 years ago

Hey, I recently got this issue which apparently cannot recognize the env file and I have no idea why this happens. Any ideas?

It happens in my dockerfile when built and ran.

pete0959 commented 2 years ago

Same fault here - no answers yet

temrb commented 2 years ago

I also currently have this issue..

joaovitor123jv commented 2 years ago

Same issue here, no code changes from last build. Using docker image node:14 from dockerhub

AngelHadzhiev commented 2 years ago

Hey,

I see that you the same issue as I do. I did have it resolved by adding this dependency:

"env-cmd": "^10.1.0"

I hope it helps you out.

joaovitor123jv commented 2 years ago

A thousand thanks @AngelHadzhiev ! Your suggestion works like a charm. I was using version "env-cmd": "^8.0.2" before for some unknown reason.