简体   繁体   中英

Flutterfire configure error attempting to run a command

I have installed Firebase CLI, but when I run flutterfire configure in my app folder, I get the following error:

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.

Is there anything I'm missing?

First, run the command "dart pub global activate flutterfire_cli" . After running the command "dart pub global activate flutterfire_cli" you should get a warning message, you just need to add the path to the path variable. Go to the Finder in your Mac. Select "Go->Home" at the top. Inside the home page, use the keyboard shortcut (Command + Shift +.(period)) to show hidden files. Then, look for the file.zshrc. Add the path from the warning message in the zshrc file, it should look like this: export PATH="$PATH":"$HOME/.pub-cache/bin"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM