i had a different error, but the same network connection issue. i read through this thread: https://github.com/yarnpkg/yarn/issues/15
and ended up uninstalling/reinstalling node/npm which fixed my issue. maybe there's something wrong with your node installation too?