flutterzshmacos-catalina

zsh: command not found: flutter?


I've tried to install flutter multiple times, and could run flutter doctor once, but after closing the terminal I couldn't. Don't know how I did it, and this keeps coming on the screen.

user@users-MacBook-Pro flutter % export PATH="$PATH: /Users/user/Desktop/flutter/bin"
user/users-MacBook-Pro flutter % flutter --version
zsh: command not found: flutter
user@users-MacBook-Pro flutter %  

So I have changed my path, changed the shell to -zsh, because I work with macOS Catalina, but nothing seems to work. What should I do?


Solution

  • Open Terminal and Type:
    vim $HOME/.zshrc

    After that, we need to edit that file!
    Press command I

    Now on a new line Type:
    export PATH="$PATH:/YOUR_FILE_PATH/flutter/bin Don't forget to update YOUR_FILE_PATH!

    Now press esc

    Now type :wq! to exit

    Now restart your terminal