Firebase "No currently active project" in CI
The CLI has no active project. Locally you would set one with firebase use, but that state is not present on a fresh runner, so a command that needs a project fails until you pass --project.
What this error means
A command fails with "Error: No currently active project. Run firebase use --add or pass --project" on a runner with no selected project.
firebase
Error: No currently active project.
Run firebase use --add to define a new project alias.Common causes
No project selected on the runner
The active-project state from firebase use does not carry into a fresh CI runner.
No default in .firebaserc and no --project flag
Without a default alias in .firebaserc or an explicit --project, the CLI has nothing to act on.
How to fix it
Pass --project explicitly
- Add
--project <id>to the deploy command in CI. - Or commit a
defaultalias in.firebaserc. - Re-run the command.
Terminal
firebase deploy --project my-project --non-interactiveSet a default project in .firebaserc
A committed default alias means commands resolve a project without a flag.
.firebaserc
{
"projects": { "default": "my-project" }
}How to prevent it
- Always pass
--projectin CI deploys. - Commit a
defaultalias in.firebaserc. - Do not rely on
firebase usestate in automated jobs.
Related guides
Firebase ".firebaserc" project alias not found in CIFix Firebase "Error: Unable to use alias X, unknown project alias" in CI - the .firebaserc alias passed to --…
Firebase "Invalid project id" in CIFix Firebase "Error: Invalid project id" in CI - the project id passed to --project is malformed or does not…
Firebase "Failed to get Firebase project ... permission" in CIFix Firebase "Error: Failed to get Firebase project X. Please make sure the project exists and your account h…