Giter VIP home page Giter VIP logo

Comments (5)

akinwol avatar akinwol commented on June 20, 2024

I am also struggling with this issue. Eas build uses eas.json to create the env variables but for eas updates I can't seem to get it to use env.staging or env.development. It just defaults to whats in env.production.

from expo-cli.

julien-lets avatar julien-lets commented on June 20, 2024

@onkardeol Have you tried adding NODE_ENV=development before the eas update command? It may not be the nicest solution, but it seems to work for me (only locally, though).

from expo-cli.

byCedric avatar byCedric commented on June 20, 2024

Hi all! The eas.json build profile does not relate to the "standard dotenv" environments. Dotenv is based on NODE_ENV, and autoselects the right .env.* files based on dotenv-rails conventions. The eas.json build profile names do not overlap with this concept.

In eas.json, you can define a set of environment variables you want for that specific build through the env property. If these environment variables contain semi-secret strings, I would recommend using EAS Secrets.

⚠️ Keep in mind that if you use the secret in your app, it's always compiled into the binary. Do not use secret credentials or tokens directly in your app, use an API in between instead.

We still need a better story about how these two mechanisms relate; feel free to open suggestions on our docs at github.com/expo/expo if you have a good idea.

For now I'll close this issue as this repository will be archived soon. Hope this helps!

from expo-cli.

matart15 avatar matart15 commented on June 20, 2024

@byCedric Looks like secrets are not loading when i use pnpx eas-cli update --branch preview --message \"update try\"

I have secrets set.
Screenshot 2024-01-07 at 14 58 06
image

then on preview i tried

<Pressable
              onPress={() => {
                Alert.alert("", JSON.stringify(process.env));
              }}
            >

This is all there is

Screenshot 2024-01-07 at 15 02 03

from expo-cli.

matart15 avatar matart15 commented on June 20, 2024

Oh. I did not see issue wa closed. opening new one
expo/eas-cli#2170

from expo-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.