Hi.
I have faced an issue with this module recently where a computer had some really odd yarn version (yarn --version returned "0.32+git") and this line ended up throwing a TypeError: Invalid Version: 0.32+git.
Can we start checking for valid versions on commands output? I can submit a PR with this fix, if you want.