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?
Add a comment
|
2 Answers
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.
Comments
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;
- Open your bash config by running this command
nano ~/.bashrcin your Bash terminal - Add this line:
alias flutterfire='cmd //c flutterfire' - Save and exit by pressing
Ctrl + X, thenY, thenEnter - 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.