Skip to content

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

Open

Description

@alarbada

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.

Activity

  1. gustavohenke commented on Nov 4, 2024

    @gustavohenke
    Member

    Hey! Are you able to share a reproduction repository?

  2. alarbada commented on Nov 4, 2024

    @alarbada
    Author

    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!

  3. added theissue type on May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions