concurrently icon indicating copy to clipboard operation
concurrently copied to clipboard

cd ./app && bun dev as command doesn't read .env vars

Open alarbada opened this issue 1 year ago • 2 comments

A bit of a weird issue, but I cannot explain it better.

in a vite app that sits at ./app folder, and concurrenlty being executed on the root directory (.), if I run concurrently "cd app && bun dev" the vite app starts, but the environment variables are not read.

This doesn't happen with goreman.

alarbada avatar Oct 31 '24 04:10 alarbada

Hey! Are you able to share a reproduction repository?

gustavohenke avatar Nov 04 '24 10:11 gustavohenke

Hum not really sorry, but any vite app sitting at a custom ./app folder and running concurrently from the root should be enough to reproduce the error.

I moved to goreman and it has the same annoying behaviour, my current solution is to change the dev command to source .env && vite dev to make it work.

My setup is also a bit uncommon, I've got .env file and an app/.env file. The later is a hard link from the former. I'm on ubuntu linux.

Hope this helps!

alarbada avatar Nov 04 '24 13:11 alarbada