0

I have installed Firebase CLI on my Windows OS machine, I have activated FlutterFire CLI, and have added Dart’s global bin to my system PATH But when I run flutterfire --version command in my bash terminal, it does not recognize the command. it works well in command prompt and PowerShell, but not in the GitBash terminal. Is there any help on this issue?

2 Answers 2

2

I'm not a Windows expert, but it seems Bash is not inheriting the PATH you've set to the environment. I would try the following:

In Bash, run

nano ~/.bashrc

and in the file, write

export PATH="$PATH:/c/Users/<YourUsername>/AppData/Roaming/Pub/Cache/bin"

Then, open another Bash session and see if the executable is found.

Sign up to request clarification or add additional context in comments.

Comments

1

I have found the Solution. The issue is that, Bash does not recognize flutterfire --version command because, It can’t run .bat or .exe files directly — so even if flutterfire is installed, it won’t work unless you alias it. Do the following;

  1. Open your bash config by running this command nano ~/.bashrc in your Bash terminal
  2. Add this line: alias flutterfire='cmd //c flutterfire'
  3. Save and exit by pressing Ctrl + X, then Y, then Enter
  4. Try this command when you done with step 1..3 flutterfire --version

You’re done! Now, you can use flutterfire in Git Bash just like in CMD.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.