skip to Main Content

We used dotenv lib with classic builds and it worked fine providing a possibility to manage different environments. But it stopped working when we moved to EAS builds.

What are possible solutions?

2

Answers


  1. Chosen as BEST ANSWER

    I tried to replace dotenv with a combination of direnv tool and EAS secrets but then I accidentally found this file in Expo github repo. It seems like creating .easignore file copying .gitignore file excluding env files makes dotenv work with EAS.


  2. react-native-dotenv maintainer here. Be careful NOT to commit .env to git. This is a major security risk. .env files are in .gitignore for a very good reason. Instead, the EAS documentation says :

    To create app-specific secrets, navigate to the "Secrets" tab in your project dashboard.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search