Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter Command - Powershell.exe not in PATH error message

Tags:

flutter

I have flutter installed and everything works fairly alight but every time I run a flutter command I get the following message before the command actually runs.

Error: PowerShell executable not found. Either pwsh.exe or PowerShell.exe must be in your PATH.

I added the Powershell.exe path to my PATH variable (both System & User) and also added C:\Windows\System32 as I read that on one of the Github/SO forums. Any idea how to get rid of this? I am following a Udemy course and have followed every instruction to the dot but the instructor does not get this message.

like image 315
kenneth-rebello Avatar asked Mar 03 '26 19:03

kenneth-rebello


2 Answers

Add this to user Path variables and system path variables

  1. C:\src\flutter\bin

Add these to Environment System Path Variables

  1. C:\Program Files\Git\cmd
  2. C:\Windows\System32\WindowsPowerShell\v1.0\
  3. C:\Windows\System32

My problem was the missing of 3rd from System path variables.

like image 110
Foysal Khandakar Joy Avatar answered Mar 06 '26 13:03

Foysal Khandakar Joy


Go "Edit environment variables for your account" under "User variables" add to Path this line

C:\Windows\System32\WindowsPowerShell\v1.0

It solved my problem.

like image 42
Abdurrahman Oğuzhan Durmaz Avatar answered Mar 06 '26 12:03

Abdurrahman Oğuzhan Durmaz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!