pidtree 0.6.0 breaks Node process trees on Windows 11 after WMIC removal
Microsoft removed the WMIC command-line tool starting with Windows 11 22H2, silently breaking any Node.js tooling that depends on it for process-tree queries. The widely used pidtree library version 0.6.0 shells out to WMIC on Windows, causing it to fail with an ENOENT error that gets swallowed silently rather than surfaced as a visible crash. Because the failure returns an empty child list instead of an exception, affected applications simply report a process tree of size one, making busy processes appear idle. Version 1.0.0 of pidtree fixes the issue by falling back to PowerShell's Get-CimInstance when WMIC is unavailable, but semver caret ranges pinned to ^0.6.0 will never auto-upgrade to it. Developers are advised to audit their lockfiles for the outdated version and, if upgrading is not possible, replace WMIC calls with a single Get-CimInstance Win32_Process snapshot per polling cycle for better performance.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in