After installing and linking the library, and adding the apply to the build.gradle, i'm trying to run 'ENVFILE=.env.dev react-native run-android' and getting that error. Anyone else seen this??
ENVFILE=.env.dev
This is a command that creates/sets the variable ENVFILE to the value .env.dev before running the react build.
It does not work on Windows.
You can try the windows command set and setx to set environment variables I did not have much success doing that and having react-native-config take that value into account.
I'm reading this lib source code now to try to see why the system variable is not being used, If someone has insight feel free to help.
If you are using powershell:
$env:ENVFILE="name.of.file"; react-native run-android
If you are using regular cmd:
SET ENVFILE = 'name.of.file' && react-native run-android
Good Luck!
:+1:! @ofirgeller nailed it, thank you!
This should be clearer in the latest readme.
For anyone using Git Bash:
set ENVFILE='name.of.file' && react-native run-android
Most helpful comment
If you are using powershell:
$env:ENVFILE="name.of.file"; react-native run-androidIf you are using regular cmd:
SET ENVFILE = 'name.of.file' && react-native run-androidGood Luck!