I'm importing MOCK_CURRENT_LOCATION_LATITUDE from react-native-dotenv, however I'm not expecting it to always be set, and thus in the code I check with an if to see if it's set.
Instead I get Try to import dotenv variable "MOCK_CURRENT_LOCATION_LATITUDE" which is not defined in any .env files. and a redbox error for it even though I intentionally do not want it set in my env.
What am I supposed to do to have optional environment variables?
I'm importing
MOCK_CURRENT_LOCATION_LATITUDE
from react-native-dotenv, however I'm not expecting it to always be set, and thus in the code I check with anif
to see if it's set.Instead I get
Try to import dotenv variable "MOCK_CURRENT_LOCATION_LATITUDE" which is not defined in any .env files.
and a redbox error for it even though I intentionally do not want it set in my env.What am I supposed to do to have optional environment variables?