I tried to install a package with yarn earlier today and I got this
yarn install
yarn install v1.9.4
[1/4]
I had the same issue and solved by following steps:
Run the terminal command
Restart your terminal.
it worked for me.