flutterfirebaseconfigure

getting error zsh: command not found: flutterfire


I'm developing app in flutter and did firebase configuration to my flutter app.Using IDE - VSCode, Firebase configuration for flutter project.

I'm getting error all time:

zsh: command not found: flutterfire, giving error Undefined name 'DefaultFirebaseOptions'.
Try correcting the name to one that is defined, or defining the name.dart
undefined_identifier

This is my code -

import 'firebase_options.dart';


Future<void> main() async {`enter code here`
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp(
    options: DefaultFirebaseOptions.currentPlatform,
  );
  
  runApp(const MyApp());
}
        

I'm getting error all time

    logcat ==

    getting error -  zsh: command not found: flutterfire
    
         flutterfire configure
        zsh: command not found: flutterfire

Solution

  • follow the Homebrew installation steps -
    
    % /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    
    check for % brew --version
    
    if it produce error : zsh: command not found: brew 
    
    then install git using cmd :
    
    % brew install git
    
    it may give this error again : zsh: command not found: brew
    
    then again check for :  
    
    % git --version
    
    if git installed will show this : git version 2.39.3 (Apple Git-146)
    
    then run cmd to export path : % export PATH="/opt/homebrew/bin:$PATH"
    
    print path : check this cmd
    
    % echo $PATH
    
    it will take few min
    
    after that run cmd to install git
    
    % brew install git
    
    it will download files
    
    you will see 
    
    - zsh completions and functions have been installed to:
      /opt/homebrew/share/zsh/site-functions
    
    check for version :
    
    % brew --version
    
    Homebrew 4.3.14
    
    Cheers:  zsh: command not found: brew issue fixed now!