Environment:
OS: Windows 10
Node: 6.10.0
Yarn: 0.21.3
npm: 3.10.10
Watchman: Not Found
Xcode: N/A
Android Studio: Version 2.3.0.0 AI-162.3764568
Packages: (wanted => installed)
react: 16.0.0-alpha.12 => 16.0.0-alpha.12
react-native: 0.48.4 => 0.48.4
Version: [email protected]
set ENVFILE='.env.local' && react-native run-androidReading env from: '.env.local'
**************************
*** Missing .env file ****
**************************
Solution: For windows users, running command without quote when setting ENVFILE variable works
set ENVFILE=.env.dev && react-native run-android
Hello Can anyone explain how to resolve this below issue on react-native app
Scanning folders for symlinks in C:Userssrcmobile-appnode_modules (48ms)
Starting JS server...
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
Reading env from: env.prod
* Missing .env file **
@policz Did you got any solution for dis problem?
No, Yet i didn't any solution.
@policz Me too same here.
Only workaround now found is to create a new env file(with extension .env) and use it for the builds.
Is env.prod in the same dir? How are you making it pick that diff env?
Closing the original issue now that #222 is in/let me know of any updates here.
@pedro
Yes. Both config files are in the same dir.
As mentioned here I am using either ENVFILE=.env.uat or ENVFILE=.env.stg depending on env I need. It was working earlier. But only from few days it's not working.
I'm getting that error message having the .env files in different path to root dir.
Path received is right: Documents/GitHub/user-mobile/src/whiteLabel/canarias/.env.demo
Other possible path used is: Documents/GitHub/user-mobile/src/whiteLabel/mallorca/.env.demo
Do someone know anything?
Please note that for .sh files to set environment variable you should do:
export ENVFILE=.env.prod
you need to add defaultEnvFile property
Most helpful comment
Solution: For windows users, running command without quote when setting ENVFILE variable works
set ENVFILE=.env.dev && react-native run-android