# Changed an EXPO_PUBLIC_ variable but the app still uses the old value

> EXPO_PUBLIC_* values are inlined into the bundle at transform time and Metro caches transformed files, so a changed .env value is not picked up.

Web page: https://davidewins.com/errors/expo-public-env-needs-metro-clear

Expo. Confirmed fix, 25 September 2026.

Versions: Metro

There is no error message for this one, only the symptom in the title.

## Cause

EXPO_PUBLIC_* values are inlined into the bundle at transform time and Metro caches transformed files, so a changed .env value is not picked up.

## Fix

Restart Metro with the cache cleared:
```bash
npx expo start --dev-client --clear
```
When exporting an update, also use `--clear` or the old value can be re-baked.

## More Expo errors

- [Dev client red screen: No script URL provided (launcher never appears)](https://davidewins.com/errors/expo-dev-client-no-script-url-precompiled)
- [Bundle fails with Invalid expression encountered after supabase-js update](https://davidewins.com/errors/supabase-js-hermes-invalid-expression)
- [After upgrading to SDK 57, expo-font / expo-image / expo-asset config is missing](https://davidewins.com/errors/expo-sdk57-plugins-must-be-declared)
- [SDK upgrade: export dies with SyntaxError after expo install --fix](https://davidewins.com/errors/expo-install-fix-leaves-babel-preset-stale)
- [expo-doctor wants TypeScript 6 but tsc reports hundreds of errors](https://davidewins.com/errors/typescript-6-explodes-typecheck-expo)

[Search all errors](https://davidewins.com/errors)
