相关疑难解决方法(0)

错误“术语‘flutterfire’未被识别为 cmdlet、函数、脚本文件或可操作程序的名称”

我正在尝试在我的根项目中安装 flutterfire_cli,所以我输入了以下命令:

FirebaseFirestore firestore = FirebaseFirestore.instance;
Run Code Online (Sandbox Code Playgroud)

之后,这是控制台会话(PowerShell):

FirebaseFirestore firestore = FirebaseFirestore.instance;
Run Code Online (Sandbox Code Playgroud)

输出:

cd C:\Users\PC\Desktop\eventually
dart pub global activate flutterfire_cli
Run Code Online (Sandbox Code Playgroud)

为了修复该警告,我将C:\Users\PC\AppData\Local\Pub\Cache\bin添加到系统变量环境中的Path环境变量中。(但这不起作用,我仍然收到警告)

接下来,我尝试使用以下命令生成firebase_options.dart文件,如文档所述:

Package flutterfire_cli is currently active at version 0.1.1+2.
Resolving dependencies...
The package flutterfire_cli is already activated at newest available version.
To recompile executables, first run `global deactivate flutterfire_cli`.
Installed executable flutterfire.
Warning: Pub installs executables into C:\Users\PC\AppData\Local\Pub\Cache\bin, which is not on your path.
You can fix that by adding that directory …
Run Code Online (Sandbox Code Playgroud)

firebase firebase-tools flutter

91
推荐指数
8
解决办法
17万
查看次数

如何解决 macOS 中的 zsh: command not found: flutterfire 问题?

我按照文档在我的 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.
Run Code Online (Sandbox Code Playgroud)

之后我用了

flutterfire configure
Run Code Online (Sandbox Code Playgroud)

我收到此错误(不是错误)zsh: command not found: flutterfire 如何解决此问题?我这有什么环境错误吗?

firebase flutter

24
推荐指数
4
解决办法
3万
查看次数

标签 统计

firebase ×2

flutter ×2

firebase-tools ×1