2
0

More than 1 year has passed since last update.

flutterfireがcommand not foundになる対処法

Posted at

概要

FlutterでFirebaseを使う時にflutterfire-cliをインストールしfirebase_options.dartを追加する必要がある。
flutterfire_cliをインストールするには以下を実行する。

dart pub global activate flutterfire_cli

その後firebase_options.dartを追加するためにflutterfire configureを実行する。
しかし、pathを通していないとcommand not foundのエラーが出力される。

解決法

上記のdart pub global activate flutterfire_cli時に出力されていたwarnnigを確認する。

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.2.1+1.

それぞれのshellにあった設定ファイルにpathを追加する。
ex) bashの場合.bashrc, zshの場合.zshrc

pathの通し方はwarrningにあるようにexport PATH="$PATH":"$HOME/.pub-cache/bin"を追加する。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0