Switch to modern Yarn
Development of legacy Yarn (1.x) has been discontinued for quite a while.
If you hit bugs or issues with Yarn 1.x, we strongly suggest you migrate to the latest release - at this point they have been maintained longer than 1.x, and many classes of problems have already been addressed there.