zsh: command not found: flutter usually indicates that the flutter path is not mentioned in .zshrc file. This issue commonly happens when you upgrade macOS and try to run any flutter command from the terminal. We also face this issue when you install android studio and set flutter SDK path to it first time and try to run any flutter command from terminal.

zsh: command not found

We can solve this issue by following two types of approaches.
1. Adding flutter SDK path from terminal.
2. Manually adding flutter SDK path to .zshrc file.

Approach 1 : Adding flutter SDK path from terminal.

– Open a terminal and hit the following command.
vim $HOME/.zshrc
vim home

– Now it will open a file in terminal and show its content.
terminal file

– Press the i key to enable insert mode, then you can add a flutter sdk path.

Format: export PATH=”$PATH:/YOUR_FLUTTER_DIR/flutter/bin”

Example: export PATH=”$PATH:/Users/Rohan/Flutter/flutter-3.10.0/flutter/bin”
Export Path

– Press “Esc” and write :wq! Then hit enter to save this file.
Esc file

– Now Reopen the terminal and run flutter –version command.
-Version Command

– Now you are able to run any flutter commands.

Approach 2 : Manually adding flutter SDK path to .zshrc file.

– Open the finder and navigate to admin directory.
admin directory

– Press cmd + shift + . For unhide files.
unhide-file

– Open .zshrc file and add flutter SDK path.

Format: export PATH=”$PATH:/YOUR_FLUTTER_DIR/flutter/bin”
Example: export PATH=”$PATH:/Users/Rohan/Flutter/flutter-3.10.0/flutter/bin”
Flutter SDK

– Now open the terminal and run flutter –version command.
F Version CMD

– Now you are able to run any flutter commands.

Support On Demand!

Flutter