16

I followed document to add firebase in my flutter app. I got 1 warning and message like

    Warning: Pub installs executables into $HOME/.pub-cache/bin, which is not on your path.
    You can fix that by adding this to your shell's config file (.bashrc, .bash_profile, etc.):
Warning: Pub installs executables into $HOME/.pub-cache/bin, which is not on your path.
You can fix that by adding this to your shell's config file (.bashrc, .bash_profile, etc.):

  export PATH="$PATH":"$HOME/.pub-cache/bin"

Activated flutterfire_cli 0.1.1+2.

after this i used

flutterfire configure

and i got this error (not an error) zsh: command not found: flutterfire How to resolve this ? and I this any environment error ?

Vora Ravi
  • 197
  • 1
  • 2
  • 12

5 Answers5

65

Set path for zsh on Mac:

  1. Run vim ~/.zshrc
  2. Press i
  3. Paste export PATH="$PATH":"$HOME/.pub-cache/bin"
  4. Press esc
  5. Type :wq! and press enter
  6. Restart the terminal

If successfull which flutterfire will work.

BugsOverBugs
  • 698
  • 3
  • 8
27

Here is what worked for me: dart pub global run flutterfire_cli:flutterfire configure https://stackoverflow.com/a/72640644/20406073

  • yes, this worked for me, but with project flag like: dart pub global run flutterfire_cli:flutterfire configure --project=YOUR_FIREBASE_PROJECT_ID – Faisal Shahzad Jul 07 '23 at 03:51
12

[I am using Mac] This helped me, Just keep in mind when you follow below steps from official website:-

 npm install -g firebase-tools
 firebase login
 dart pub global activate flutterfire_cli
 flutterfire configure


If flutterfire configure doesnot work then, Add:

export PATH="$PATH":"$HOME/.pub-cache/bin" 

to your .bash_profile from Home directory of your mac. Now, Restart your system, And after opening your system, try flutterfire configure again in VS Code. It will work. Then:

flutter pub add firebase_core
flutter pub get
Anurag Sharma
  • 4,276
  • 2
  • 28
  • 44
1

set path to flutterfire by running command vim ~/.bash_profile press i for insert paste the path export PATH="$PATH":"$HOME/.pub-cache/bin" press esc key to save then :wq to exit

you can run which flutterfire to check path

-1

[1

  1. Run vim ~/.zshrc
  2. Press i
  3. Paste flutter/bin path as shown in the image
  4. Paste export PATH="$PATH":"$HOME/.pub-cache/bin"
  5. Press esc
  6. Type :wq! and press enter
  7. Restart the terminal
Saurav Prakash
  • 588
  • 1
  • 5
  • 26