Comments (5)
Here is a patch that fixes an issue:
diff --git a/build/env.js b/build/env.js
index f5e5e4efd8609d683d709219acf8b46554e62978..4c1bc0fc8baeae92fff946dcfd31cc60252f968f 100644
--- a/build/env.js
+++ b/build/env.js
@@ -138,24 +138,22 @@ function createControlledEnvironment() {
function _expandEnv(parsedEnv) {
const expandedEnv = {};
+ const processEnv = {...process.env}
+ for (const key in parsedEnv) {
+ delete processEnv[key]
+ }
// Pass a clone of `process.env` to avoid mutating the original environment.
// When the expansion is done, we only store the environment variables that were initially parsed from `parsedEnv`.
- const allExpandedEnv = (0, _dotenvExpand().expand)({
+ (0, _dotenvExpand().expand)({
parsed: parsedEnv,
- processEnv: {
- ...process.env
- }
+ processEnv: processEnv
});
- if (allExpandedEnv.error) {
- console.error(`Failed to expand environment variables, using non-expanded environment variables: ${allExpandedEnv.error}`);
- return parsedEnv;
- }
// Only store the values that were initially parsed, from `parsedEnv`.
for (const key of Object.keys(parsedEnv)) {
var _allExpandedEnv$parse;
- if ((_allExpandedEnv$parse = allExpandedEnv.parsed) !== null && _allExpandedEnv$parse !== void 0 && _allExpandedEnv$parse[key]) {
- expandedEnv[key] = allExpandedEnv.parsed[key];
+ if ((_allExpandedEnv$parse = parsedEnv) !== null && _allExpandedEnv$parse !== void 0 && _allExpandedEnv$parse[key]) {
+ expandedEnv[key] = parsedEnv[key];
}
}
return expandedEnv;
We need to allow keys to be overwritten, because existing keys is prefered https://github.com/motdotla/dotenv-expand/blob/ff7e2efd0d9925c7da82c167ae77d22a6c76e878/lib/main.js#L24C10-L31
from expo.
If you want I can provide a pr with this changes. But this do not fixes that change of env vars do not cause automatic server reload
from expo.
Thank you for filing this issue!
This comment acknowledges we believe this may be a bug and there’s enough information to investigate it.
However, we can’t promise any sort of timeline for resolution. We prioritize issues based on severity, breadth of impact, and alignment with our roadmap. If you’d like to help move it more quickly, you can continue to investigate it more deeply and/or you can open a pull request that fixes the cause.
from expo.
Hi @XantreDev! Thanks for the issue report.
If you want I can provide a pr with this changes.
Yeah, feel free to open a PR that applies the fix you mentioned. Let's consider the auto-reload, or HMR, issue separate from this one.
from expo.
Ok. @byCedric I will provide it today/tomorrow
from expo.
Related Issues (20)
- LocalAuthentication.hasHardwareAsync() returns false on iPhone 13 Pro if FaceID permission was canceled
- npx expo lint gives a maximum call stack size exceeded isn't solved yet HOT 2
- Babel error after updating to EXPO 51 HOT 5
- Expo 51: expo-sensors: DeviceMotion.addListener crashes on Android with Java Context error HOT 2
- Expo SDK 51 can't add the google-signin npm package. HOT 2
- [expo 50] My Expo apps only work in dev mode, stuck on splash screen, showing 'New update available, downloading...' HOT 2
- [expo-sqlite] Android test builds fail (task :expo:mergeDebugAndroidTestNativeLibs) HOT 1
- [SDK51][Dev Client] Development client on android fails to open eas update from updates list with "Failed to open app" HOT 16
- [eas-build-local] Metro errors with SHA-1 for file ... index.js ... is not computed when using "index.js" as package main HOT 9
- Build fails after running npx install-expo-modules@latest command because code added to wrong location in android/app/build.gradle HOT 5
- Expected metro@~0.80.8 package after SDK 51 update was installed. HOT 11
- [expo-router] initialRouteName has no effect HOT 1
- Why is useColorScheme works weird on web from the standard npx create-expo-app@latest? HOT 4
- [docs] date/version the docs on the site HOT 1
- My Expo app is stuck in a white screen after booting / running the app right after the splash screen, this happens after installing and integrating expo-sms HOT 1
- expo-auth-session and expo-apple-authentication have incompatible types for identity token stirngs HOT 2
- WRITE_EXTERNAL_STORAGE permission issue. HOT 1
- Can't find bundle URL when building iOS app with a duplicated and renamed Debug build scheme HOT 7
- expo-image-manipulator removes most exif data HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from expo.