Flutter update causing error "Flutter requires PowerShell 5.0 or newer" irrecoverable

3k Views Asked by At

After I updated flutter (using "flutter update") I start getting an error

Flutter requires PowerShell 5.0 or newer

And on my Windows 8, I am not able to install PowerShell 5.0. It is throwing an error

The update is not applicable

Now I just want to revert back to older version of flutter (which was working on my system). But I am not able to figure out which flutter version that was working on my PC before upgrade, and which version it became after upgrading. Because for all command line params, flutter is just giving above mentioned PowerShell version error and is quitting.

Flutter is stuck after upgrade. Any solution?

2

There are 2 best solutions below

5
Atul On

Ok I found that in this script bin\internal\update_dart_sdk.ps1 there is variable $psMajorVersionRequired = 5 I just made it's value 3 and flutter seems working so far. Now "flutter doctor" shows me version 1.22.5 (and as I can see it here it is latest as of now)

0
Zargy KZ On

In order to resolve this issue, in my case it was resolved updating Powershell, I'm currently using Windows 8.1. I downloaded following these steps:

  1. Go to -> https://learn.microsoft.com/en-us/powershell/scripting/windows-powershell/install/installing-windows-powershell?view=powershell-7.2
  2. Clic on Download PowerShell.
  3. After that will show you a github page and you'll have to download the version needed to your system.

I hope that works for you!