t3-oss / create-t3-turbo

Clean and simple starter repo using the T3 Stack along with Expo React Native
https://turbo.t3.gg
MIT License
4.28k stars 352 forks source link

bug: Environment variables not loaded in expo #981

Closed janwirth closed 2 months ago

janwirth commented 2 months ago

Provide environment information

  System:
    OS: macOS 14.4.1
    CPU: (8) arm64 Apple M2
    Memory: 187.48 MB / 24.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.5.0 - /usr/local/bin/node
    Yarn: 1.22.19 - ~/Library/pnpm/yarn
    npm: 10.2.4 - ~/n/bin/npm
    pnpm: 8.6.10 - /opt/homebrew/bin/pnpm
    bun: 1.1.3 - ~/Library/pnpm/bun

I am using bun as a package manager.

Describe the bug

I have tried defining env vars in the /.env /apps/expo/.env and prefixing the expo start command with an environment variable that starts with EXPO_ Also if I defined the NODE_ENV it does not get picked up.

Link to reproduction

-

To reproduce

I started a bare repository two days ago and in metro config I did not modify anything but removing the withTailwind decorator.

Additional information

No response

adamspotlite commented 2 months ago

@janwirth are you using EXPO_PUBLIC? Link to docs here

janwirth commented 2 months ago

My bad, I was coming from another template and used only te EXPO_ prefix. thank you.