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
Just "start" the Firebase emulator using firebase emulators:start --import=./testdata/emulatordata --project default
-> The following warning is emitted indicating it could not load the IS_STAGING environment variable from the .env files:
? Enter a boolean value for IS_STAGING:
[REQUIRED] Expected behavior
Is should read the variable from the .env.default file.
[REQUIRED] Actual behavior
It asks for the value of the IS_STAGING environment variable.
On top of that, after entering the value when prompted, it tries to write it to a new file .env.my-project-id instead of the existing .env.default (where default is the alias).
This causes the following output and prevents the emulator from running:
i functions: Created new local file .env.my-project-id to store param values. We suggest explicitly adding or excluding this file from version control.
!! functions: Failed to load function definition from source: FirebaseError: Can't have both dotenv files with projectId (env.my-project-id) and projectAlias (.env.default) as extensions.
It should not write any configuration here as the IS_STAGING is already defined in both the .env.default and .env.staging.
Additionally:
If I now rename the .env.default and env.staging files to .env.my-project-id and .env.my-staging-project-id, it still prompts for the value. If I enter it, it fails to start the emulator as the value is already defined (this relates to/duplicates #5219 ):
? Enter a boolean value for IS_STAGING: false
i functions: Loaded environment variables from .env, .env.my-project-id.
i functions: Loaded environment variables from .env, .env.my-project-id.
!! functions: Failed to load function definition from source: FirebaseError: Attempted to write param-defined key IS_STAGING to .env files, but it was already defined.
The text was updated successfully, but these errors were encountered:
[REQUIRED] Environment info
firebase-tools: 11.17.0
Platform: Windows
[REQUIRED] Test case
.env
file:.env.default
file:.env.staging
file:.env.local
file:Have the following code in the
index.ts
that references this parameter's value:Have some test that calls a Cloud Function.
[REQUIRED] Steps to reproduce
firebase emulators:start --import=./testdata/emulatordata --project default
-> The following warning is emitted indicating it could not load the IS_STAGING environment variable from the .env files:
[REQUIRED] Expected behavior
Is should read the variable from the
.env.default
file.[REQUIRED] Actual behavior
It asks for the value of the IS_STAGING environment variable.
On top of that, after entering the value when prompted, it tries to write it to a new file
.env.my-project-id
instead of the existing.env.default
(where default is the alias).This causes the following output and prevents the emulator from running:
It should not write any configuration here as the
IS_STAGING
is already defined in both the.env.default
and.env.staging
.Additionally:
If I now rename the
.env.default
andenv.staging
files to.env.my-project-id
and.env.my-staging-project-id
, it still prompts for the value. If I enter it, it fails to start the emulator as the value is already defined (this relates to/duplicates #5219 ):The text was updated successfully, but these errors were encountered: