Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

flutterfire configure fails in the terminal with command not found

Errorzsh: command not found: flutterfire

Short answer

FlutterFire CLI is a Dart tool installed separately. zsh can only find it when it was installed with dart pub global activate and the pub cache bin folder is on your PATH. Install it, add $HOME/.pub-cache/bin to PATH, open a new terminal, or run it through dart pub global run until PATH is fixed.

  • Applies to Flutter 3.35 stable, Dart 3.9, macOS 15 with zsh, FlutterFire CLI from pub.dev
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Look inside the pub cache bin folder. If a flutterfire file is there, the tool is installed and the problem is PATH. If the folder is empty or missing, the tool was never installed.

    ls "$HOME/.pub-cache/bin"
    echo "$PATH" | tr ':' '\n' | grep pub-cache
  2. 2Match what you see, then jump to its fix

    1. 1ls shows no flutterfire file in the pub cache bin folder, or the folder does not existFlutterFire CLI was never installed on this machineFix
    2. 2The file exists in $HOME/.pub-cache/bin, but typing flutterfire still gives command not found, and the grep in the first step prints nothingThe pub cache bin folder is not on PATHFix

What does the error look like?

  • zsh: command not found: flutterfire
  • flutterfire: command not found

Cause 1 of 2

FlutterFire CLI was never installed on this machine

1Check

The Firebase setup guide for Flutter lists the CLI as a separate install step. The Firebase guide installs it with dart pub global activate.

ls "$HOME/.pub-cache/bin"

2Fix

Install the CLI once from any directory, using the command from the Firebase guide.

dart pub global activate flutterfire_cli

3Verify

A flutterfire file now exists in the pub cache bin folder.

ls "$HOME/.pub-cache/bin"

Confirmed by firebase.google.com

Did this fix it?

Cause 2 of 2

The pub cache bin folder is not on PATH

1Check

Dart installs global tools into the pub cache bin directory, which is $HOME/.pub-cache/bin on macOS and Linux. The shell only runs programs from folders listed in PATH.

echo "$PATH" | tr ':' '\n'

2Fix

Add the folder to PATH in your zsh startup file, then start a new terminal window so the change is read. Until then you can run the tool without PATH by naming the package and executable.

echo 'export PATH="$PATH":"$HOME/.pub-cache/bin"' >> ~/.zshrc
source ~/.zshrc

# works without any PATH change
dart pub global run flutterfire_cli:flutterfire configure

3Verify

The shell now resolves the command.

command -v flutterfire

Confirmed by dart.dev

Did this fix it?

How do I stop it coming back?

  • Put the pub cache bin line in ~/.zshrc once, so every new terminal and IDE terminal gets it.
  • Run flutterfire configure from the Flutter project folder, not from your home directory.
  • Re-run flutterfire configure when you add a platform or a new Firebase product, as the Firebase guide advises.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine built on the same technologies:

Related fixes

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.