firebase - 我如何解决 zsh : command not found: flutterfire in macOS?

标签 firebase flutter

我关注了document在我的 flutter 应用程序中添加 firebase。 我收到 1 条警告和类似的消息

    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.

之后我用了

flutterfire configure

我得到了这个错误(不是错误)zsh: command not found: flutterfire 如何解决这个问题?我这是任何环境错误?

最佳答案

在 Mac 上设置 zsh 的路径:

  1. 运行 vim ~/.zshrc
  2. i
  3. 粘贴 export PATH="$PATH":"$HOME/.pub-cache/bin"
  4. esc
  5. 输入:wq!并回车
  6. 重启终端

如果成功 which flutterfire 将起作用。

关于firebase - 我如何解决 zsh : command not found: flutterfire in macOS?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71487625/

相关文章:

flutter - 任务 ':app:validateSigningRelease' 执行失败。 flutter 错误

Flutter TextField 值总是大写和去抖动

android-studio - Android Studio 3.4.1 不显示在 mac 上运行的模拟器

xcode - 为什么我收到此错误无法为模拟器构建应用程序。在 iPhone 11 Pro Max 上启动应用程序时出错?

android - 无法解决 : com. google.firebase :firebase-core:9. 0.0

firebase - Flutter:Firebase身份验证和Firestore快照流

iOS Firebase CrashlyticsKit 未设置用户 ID

firebase - 将用户 uid 传递给 Flutter 中的 Firestore 流查询

ios - 在后台 Swift 中发送用户的位置

firebase - Cloud Functions for Firebase 能否在用户登录时执行?