You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

flutterfire命令未识别报错,配置系统环境变量后解决

解决flutterfire : The term 'flutterfire' is not recognized错误

问题重现

执行flutterfire configure命令时,出现以下错误:

flutterfire : The term 'flutterfire' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ CategoryInfo          : ObjectNotFound: (flutterfire:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

解决步骤

  1. 激活flutterfire_cli工具
    执行以下命令确保工具已激活:

    dart pub global activate flutterfire_cli
    

    执行后会提示已激活最新版本,但会指出Pub的可执行文件目录(如C:\Users\YASH\AppData\Local\Pub\Cache\bin)不在系统Path环境变量中。

  2. 添加路径到账户级环境变量

    • 打开控制面板,进入系统和安全 → 系统 → 高级系统设置
    • 在弹出的「系统属性」窗口中,切换到高级标签页,点击「环境变量」
    • 在「用户变量」区域找到Path变量,点击「编辑」
    • 点击「新建」,输入你的Pub可执行文件目录(替换成自己的用户名,例如C:\Users\你的用户名\AppData\Local\Pub\Cache\bin)
    • 依次点击「确定」保存所有设置
  3. 重启终端并验证
    关闭当前所有终端窗口,重新打开后执行flutterfire configure,命令即可正常运行。

内容的提问来源于stack exchange,提问作者Yash Shah

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.26 11:15:57