I tried to install a package with yarn earlier today and I got this
yarn install yarn install v1.9.4 [1/4]
Try clearing your cache
cache
$ yarn cache clean $ yarn // to install dependencies, no need for "yarn install"
Approach 2
$ yarn install --network-timeout 1000000
Reference https://github.com/yarnpkg/yarn/issues/4890#issuecomment-358179301