运行 flutterfire 配置时出现 FirebaseCommandException

问题描述 投票:0回答:1

我正在尝试在我的项目中配置 Firebase。使用

firebase-tools
安装
npm
包后,我尝试在我的 flutter 项目中配置 Firebase 项目,但我一直收到类似 FirebaseCommandException:

的错误
An error occurred on the Firebase CLI when attempting to run a command.

我尝试注销并重新登录。同样的问题。

我尝试创建一个新项目并尝试配置但同样的问题。我的node版本是v20.17.0,npm版本是10.8.2。我也尝试过使用最新版本的节点包,但结果相同。

Krishnas-MacBook-Air:car_rent_app krishnaprasad$ dart pub global activate flutterfire_cli
Package flutterfire_cli is currently active at version 1.0.0.
Downloading packages... . 
The package flutterfire_cli is already activated at newest available version.
To recompile executables, first run `dart pub global deactivate flutterfire_cli`.
Installed executable flutterfire.
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 (.zshrc, .bashrc, .bash_profile, etc.):

  export PATH="$PATH":"$HOME/.pub-cache/bin"

Activated flutterfire_cli 1.0.0.
Krishnas-MacBook-Air:car_rent_app krishnaprasad$ export PATH="$PATH":"$HOME/.pub-cache/bin"
Krishnas-MacBook-Air:car_rent_app krishnaprasad$ flutterfire configure --project=car-rental-app-5cb05
FirebaseCommandException: An error occured on the Firebase CLI when attempting to run a command.
COMMAND: firebase --version 
ERROR: The FlutterFire CLI currently requires the official Firebase CLI to also be installed, see https://firebase.google.com/docs/cli#install_the_firebase_cli for how to install it.
node.js flutter firebase npm
1个回答
0
投票

运行:firebase 注销

然后:firebase 登录

© www.soinside.com 2019 - 2024. All rights reserved.