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"
Related
Getting error when run the dart pub global activate flutterfire_cli in terminal.ru
Could not find a file named "pubspec.yaml" in "/Users/ammar/.pub-cache/hosted/pub.dartlang.org/quiver-3.2.1".
after login to the fierbase .I run the FlutterFire CLI command in terminal and it give the error
Could not find a file named "pubspec.yaml" in "/Users/ammar/.pub-cache/hosted/pub.dartlang.org/quiver-3.2.1".
You are missing that file it seems like. That is the file for all your dependencies. Did you delete it by any chance? By mistake perhaps?
When I tried to run Flutter app on windows, it gives an error then says Exited Sigterm. or stmh like this.
the error says;
Re-run cmake with a different source directory
cmake files does not match...
etc.
The Steps that helped me to handle this error are;
open your terminal then write following commands
flutter clean
flutter pub get
flutter run
This will remove you build file and re-create it.
Your problem should have solved now.
I am using Mac OS. i am trying register my project in firebase and use Crashlytics in firebase to check if any crash occurs in my app I had used
curl -sL https://firebase.tools | bash
command to install flutter tools it worked fine after that I tried to run
flutterfire configure
command but it throws
zsh: command not found: flutterfire
I know that I must set $path variable but to set path variable I don't know where is my flutter tools has installed in my Mac. kindly help me to set $PATH variable
run before dart pub global activate flutterfire_cli
Once you run the following command
dart pub global activate flutterfire_cli
you should get the following output
The output is telling you the executable is not on your path variable
export PATH="$PATH":"$HOME/.pub-cache/bin"
Either run the export command in your terminal
OR
Add the command to your .zhrc file
I am trying to install the flutter version manager to switch the flutter version among the different flutter projects.
I use the command to install the fvm - pub global activate fvm
but when I run the command on the terminal - fvm help
There is an error -bash: fvm: command not found
How to fix it ?
Your .pub-cache binaries are not yet added to your PATH variable, used by your terminal. Add path with the following command:
export PATH="$PATH:$HOME/.pub-cache/bin"
This is the location where fvm is installed. So by exporting this path to your PATH variable you should be able to get fvm working from anywhere in your terminal.
If you installed fvm using pub and you already have it in your path but you are still getting the error, follow these steps:
run dart pub cache repair // You may get an error: Failed to precompile fvm:main:. Just ignore that for now.
run dart pub global activate fvm
you can do a
flutter clean
then when its done, run
dart pub global activate fvm
when it's done it should work now, close the current bash terminal and open a new one
You must add the path to the fvm executable to the $PATH environment variable. After running "pub global activate fvm" you should have seen a warning with instructions on how to fix it. You can watch this: https://youtu.be/R6vKde1vIGQ
That will get you up and running.
if use windows 10 or later add system properties -> Environment Variables -> Path -> %USERPROFILE%\AppData\Local\Pub\Cache\bin
First confirm if fvm.bat is executing successfully, you should have the folder already in environment variable PATH(%USERPROFILE%\AppData\Local\Pub\Cache\bin). If it is then for fvm to run in bash, instead of fvm.bat, you need to create a shortcut, a file named fvm with no extension, the containing folder should also exist in PATH variable, the file contains location to fvm.bat and ends with a whitespace and S*.
I have installed flutter and set up the path with the zsh file for Catalina version of mac however when I run flutter doctor or flutter precache, I receive zsh: command not found: flutter. NOTE: I managed to get through these steps previously and set up android studio however I had issues when I tried to connect the simulator for Xcode and now I have had to start again.
UPDATE: When running 'flutter' or 'flutter doctor', I receive this error: Error when reading '../../../../documents/flutter/bin/cache/dart-sdk/bin/snapshots/pub.dart.snapshot': No such file or directory and it says that pub upgrade failed after 10 tries.
How would I solve this?
When I run ls -a in the home directory, I see that there's a .bash_profile, a .zshrc file and a .zprofile (which I created previously) in there. Is this related to the problem?
This looks like you don't have flutter on your PATH in ZSH.
Open your .zshrc file in your terminal with
nano .zshrc
You should see the following at the top of the file
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH
Add on the second line the path to the bin directory of your flutter SDK location, like mine:
export PATH=$HOME/bin:/usr/local/bin:$PATH:/Users/joaosoares/Projects/flutter/bin