zsh:找不到命令:flutterfire

San*_*mar 1 macos firebase flutter

我使用的是 Mac 操作系统。我正在尝试在 firebase 中注册我的项目并在 firebase 中使用 Crashlytics 来检查我使用的应用程序中是否发生任何崩溃

curl -sL https://firebase.tools | bash
Run Code Online (Sandbox Code Playgroud)

安装 flutter 工具的命令在我尝试运行之后工作正常

flutterfire configure
Run Code Online (Sandbox Code Playgroud)

命令但它抛出

zsh:找不到命令:flutterfire

我知道我必须设置 $path 变量,但要设置路径变量,我不知道我的 flutter 工具安装在我的 Mac 中的哪里。请帮我设置 $PATH 变量

小智 9

我们可以使用这些步骤

  1. dart pub global activate flutterfire_cli
  2. 然后添加export PATH="$PATH":"$HOME/.pub-cache/bin"到 .bashrc 通过code ~/.bashrc
  3. 然后source ~/.bashrc
  4. flutterfire configure