Adding more context on this issue:
- Getting EINVAL error on Windows upon NPM execution after node.js update to 20.12.2 · Issue #52572 · nodejs/node · GitHub
- Command run failed with error : spawn EINVAL · Issue #52554 · nodejs/node · GitHub
node.js has added a Windows-specific security fix in the patch version 20.12.2 which basically broke the way we currently invoke npm from the appium server code.
A workaround for that would be to downgrade the node itself to a version below the above one. Or wait until the next (patched) version of it gets published