tabrindle / envinfo

Generate a report about your development environment for debugging and issue reporting
MIT License
757 stars 58 forks source link

WMIC is deprecated in the latest Windows 11 builds #213

Open HarryGwinnell opened 2 years ago

HarryGwinnell commented 2 years ago

Attempting to run "npx envinfo" will fail under the latest Windows 11 builds as wmic is deprecated. It has been replaced with Powershell for WMI (https://docs.microsoft.com/en-us/powershell/scripting/learn/ps101/07-working-with-wmi?view=powershell-7.2)

image

HarryGwinnell commented 2 years ago

I dug into this to see if it's an easy fix. This issue comes from the os-name package, which has added Windows 11 support, but has also introduced a breaking change in moving to an ES Module format. Attempted to bump and migrate but envinfo doesn't support es modules

jonthysell commented 2 years ago

It's not just Windows 11, wmic was also deprecated in Windows 10 21H1: https://docs.microsoft.com/en-us/windows/win32/wmisdk/wmic

Related: https://github.com/react-native-community/cli/issues/1513