Skip to content
Latchkey

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

  1. Add --project <id> to the deploy command in CI.
  2. Or commit a default alias in .firebaserc.
  3. Re-run the command.
Terminal
firebase deploy --project my-project --non-interactive

Set 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 --project in CI deploys.
  • Commit a default alias in .firebaserc.
  • Do not rely on firebase use state in automated jobs.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →