我按照文档在我的 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
如何解决此问题?我这有什么环境错误吗?
Bug*_*ugs 98
在 Mac 上设置zsh的路径:
vim ~/.zshrciexport PATH="$PATH":"$HOME/.pub-cache/bin"esc:wq!并按enter如果成功which flutterfire就会起作用。
Anu*_*rma 15
[我使用的是 Mac]\n这对我很有帮助,请记住,当您按照官方网站上的以下步骤操作时:-
\n npm install -g firebase-tools\n firebase login\n dart pub global activate flutterfire_cli\n flutterfire configure\xe2\x80\xa8\nRun Code Online (Sandbox Code Playgroud)\n如果flutterfire configure不起作用,则添加:
export PATH="$PATH":"$HOME/.pub-cache/bin" \nRun Code Online (Sandbox Code Playgroud)\n到.bash_profileMac 的主目录。\n现在,重新启动系统,打开系统后,flutterfire configure在 VS Code 中重试。它会起作用的。然后:
flutter pub add firebase_core\nflutter pub get\nRun Code Online (Sandbox Code Playgroud)\n
小智 1
通过运行命令 vim ~/.bash_profile 将路径设置为 flutterfire 按 i 插入粘贴路径 export PATH="$PATH":"$HOME/.pub-cache/bin" 按 esc 键保存然后 :wq 退出
您可以运行 which flutterfire 来检查路径
| 归档时间: |
|
| 查看次数: |
33024 次 |
| 最近记录: |