You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building a production bundle, jest-worker unconditionally sets JEST_WORKER_ID on every worker process it spawns, even EAS builds when no tests are involved.
react-native-dotenv's Babel plugin runs inside those Metro transform workers and inlines variables from process.env into the bundle — including JEST_WORKER_ID, which is not declared in any .env file but is present in the worker's environment because jest-worker set it.
Impact
The result is a production app bundle with JEST_WORKER_ID as a non-null string. JEST_WORKER_ID now appears in third-party library code, in my case react-native-mmkv, which causes problems with that package (permanently sets it in test mode).
Issues with this have been raised in react-native-mmkv but I believe this problem belongs to react-native-dotenv.
Activity
github-actions commentedon Jun 1, 2026
Hey, thank you for opening this issue! 🙂 To boost priority on this issue and support open source please tip the team at https://issuehunt.io/r/goatandsheep/react-native-dotenv/issues/574
fix: prevent JEST_WORKER_ID leaking into Metro bundle (Closes dotenvx…
goatandsheep commentedon Jul 21, 2026
hi did you try using blocklist?
motdotla commentedon Jul 28, 2026
Fix here.
#592
will go out in next major release.