DEV Community

Mytx
Mytx

Posted on • Edited on

De[v]log#1: Oops.....powershell is ruined...sorry

Oops, something went wrong.
Please report this bug with ALL the details below, including both the 'Environment' and 'Exception' sections.
Please report on GitHub: https://github.com/PowerShell/PSReadLine/issues/new?template=Bug_Report.md
Thank you!

### Environment
PSReadLine: 2.2.0-beta1
PowerShell: 7.3.4
OS: Microsoft Windows 10.0.22000
BufferWidth: 132
BufferHeight: 35

Last 0 Keys

### Exception
System.TypeLoadException: Could not load type 'System.Management.Automation.Subsystem.PredictionResult' from assembly 'Microsoft.PowerShell.PSReadLine.Polyfiller, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
   at Microsoft.PowerShell.PSConsoleReadLine.PredictionViewBase.Reset()
   at Microsoft.PowerShell.PSConsoleReadLine.PredictionInlineView.Reset()
   at Microsoft.PowerShell.PSConsoleReadLine.Prediction.Reset()
   at Microsoft.PowerShell.PSConsoleReadLine.Initialize(Runspace runspace, EngineIntrinsics engineIntrinsics)
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken)

Enter fullscreen mode Exit fullscreen mode

This is the error code I got after modding my powershell7 with oh-my-posh....I don't really know what went wrong but after I restarted the powershell7...this error showed up...as if I didn't have enough error in my hands to solve....well fortunately upgrading PSreadline solve the problem

pwsh.exe -noprofile -command "Install-Module PSReadLine -Force -SkipPublisherCheck -AllowPrerelease"
Enter fullscreen mode Exit fullscreen mode

prompting this line on my built in powershell solved the problem...

so yeh...basically this one line did it and I wanted to recorded it somewhere if it were to happen again...

Top comments (4)

Collapse
 
jandedobbeleer profile image
Jan De Dobbeleer

It's funny (and sad at times) that PowerShell doesn't ship with the latest version of PSReadLine itself.

Collapse
 
mytx profile image
Mytx • Edited

Somehow...making things work on window is more of a headache than doing those on linux these days....Windows have everything and yet at the same time it doesnt have enough...maybe i got so used to do things with linux i suppose lol

Collapse
 
jandedobbeleer profile image
Jan De Dobbeleer

Trust me, there's no perfect OS. I can name so many annoyances/side effects per platform you come to dislike and like all of them depending on the task at hand.

Thread Thread
 
mytx profile image
Mytx

New days new problems i guess...I m glad i enjoy banging my head against the desk xD....