'Can´t use PowerShell commands "TypeError: Class extends value undefined is not a constructor or null"

So I´ve been having this issue in my Powershell for a while now. Sadly I can´t tell when it occured for the first time, but I updated my PC to Windows 11 a few month ago and it might(!) be, that it happened afterwards or after the PowerShell update. I´m usually working on MacOS so it never really bothered me, but now I have to use Windows for a while but literally can´t work, because I´m unable to use most of the powershell commands like npm or so. Did anyone else have that problem before? I saw a few people, but their cases were totally different, bc it occured while coding and it threw out those errors. Im only getting this when using cmd.

Example

Environmental variables

I´d be glad for any help I can get... Cheers!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source