zsh: command not found: flutter

Code Hunter picture Code Hunter · Oct 15, 2019 · Viewed 30.3k times · Source

Recently I updated Mac OS to latest Catalina and my terminal which is using zsh now start showing me following error:

zsh: command not found: flutter

It was working fine before update.

Answer

Murad Al Wajed picture Murad Al Wajed · Nov 29, 2019

You need to update the environment path.

  1. Open terminal.

  2. vim $HOME/.zshrc

  3. Press "I" key for going to insert mode.

  4. add the following line in the opened file:

    export PATH="$PATH:/YOUR_FLUTTER_DIR/flutter/bin"

  5. Press "Esc" then write :wq! in terminal and press enter to exit vim.

  6. Reopen the terminal and check "flutter doctor"

If this solution not work, remove the double quote from path.