我按照文档添加firebase在我的flutter应用程序。我得到了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
如何解决这个问题?我这任何环境错误?
5条答案
按热度按时间cnjp1d6j1#
在Mac上设置zsh的路径:
1.运行
vim ~/.zshrc
1.按
i
1.粘贴
export PATH="$PATH":"$HOME/.pub-cache/bin"
1.按下
esc
1.键入
:wq!
并按Enter键1.重新启动终端
如果成功,
which flutterfire
将工作。1qczuiv02#
[我正在使用Mac]这帮助了我,只要记住,当你按照以下步骤从官方website:-
如果
flutterfire configure
不起作用,则添加:到你的
.bash_profile
从你的mac的主目录。现在,重新启动你的系统,并打开你的系统后,再次尝试flutterfire configure
在VS代码。它会工作。然后:isr3a4wc3#
以下是对我有效的方法:
dart pub global run flutterfire_cli:flutterfire configure
https://stackoverflow.com/a/72640644/20406073(单位:千美元)2cmtqfgy4#
通过运行命令vim ~/.bash_profile设置flutterfire的路径按i插入粘贴路径导出PATH="$PATH”:“$HOME/.pub-cache/bin”按Esc键保存然后:wq退出
你可以运行flutterfire来检查路径
z9smfwbn5#
[
1.执行vim ~/.zshrc
1.按i
1.粘贴抖动/bin路径,如图所示
1.粘贴导出路径="$PATH”:“$HOME/.pub-cache/bin”
1.按Esc键
1.键入:wq!并按Enter键
1.重新启动终端