Hello Guys How are you all? Hope you all are fine. When users install flutter for the first time and run the flutter command in their terminal then users will face this error Flutter: Command not found So we will go through How to Solve Command Not Found in Flutter?
How to Solve Command Not Found in Flutter?
- How to Solve Command Not Found in Flutter?
to Solve Command Not Found in Flutter First, download the latest SDK from the flutter download page. Now to run flutter in the windows console you need to update your PATH environment variable. From the Start search bar, type ‘env’ and select Edit environment variables for your account. Under User variables check if there is an entry called Path. If the entry does exist, append the full path to flutter\bin using as a separator from existing values. If the entry does not exist, create a new user variable named Path with the full path to flutter\bin as its value.
- Command Not Found in Flutter
to Solve Command Not Found in Flutter First, download the latest SDK from the flutter download page. Now to run flutter in the windows console you need to update your PATH environment variable. From the Start search bar, type ‘env’ and select Edit environment variables for your account. Under User variables check if there is an entry called Path. If the entry does exist, append the full path to flutter\bin using as a separator from existing values. If the entry does not exist, create a new user variable named Path with the full path to flutter\bin as its value.
For Windows Users
- First, download the latest SDK from the flutter download page.
- Now to run flutter in the windows console you need to update your PATH environment variable.
- From the Start search bar, type ‘env’ and select Edit environment variables for your account.
- Under User variables check if there is an entry called Path.
- If the entry does exist, append the full path to flutter\bin using as a separator from existing values.
- If the entry does not exist, create a new user variable named Path with the full path to flutter\bin as its value.
For macOS Users
Solution 1
Simple and easy way to add your environment $PATH variable.
- Open the file
$HOME/.zshrc
$HOME
is your home path - add the following line in the opened file:
export PATH="$PATH:/YOUR_FLUTTER_DIR/flutter/bin"
- save the changes and restart your terminal session.
Solution 2
The problem is your terminal can’t find a flutter path so all we need to do is just add the environment path. follow all the below steps to add the environment path.
- Open terminal.
vim $HOME/.zshrc
- Press “I” key for going to insert mode.
- add the following line in the opened file:
export PATH="$PATH:/YOUR_FLUTTER_DIR/flutter/bin"
- Press “Esc” then write
:wq!
in terminal and press enter to exit vim. - Reopen the terminal and check “flutter doctor”
Summery
So, It’s All About How to Solve Command Not Found in Flutter?. I hope this tutorial helps you to Solve your error. Please Comment Below if You stucks anywhere with my code. And please comment below which solution worked for you. Thank You.
Also Check Out Below Tutorials
- Flutter.io Android License Status Unknown
- Failed to precompile build_runner:build_runner Error on flutter pub
- [!] Android Studio (not installed), when run flutter doctor while Android Studio installed on machine
- Flutter/Dart – FlutterFirebaseMessagingPlugin.java – Build fails with Exception “error: cannot find symbol”
- Flutter Webview throws compiling error -ThreadedInputConnectionProxyAdapterView location: class InputAwareWebView
Leave a Reply