Yarn offers a few ways of installation: install with the brew, Chocolatey (Windows) or from Linux repositories. In my case, the installation was made from Linux repository.
curl - sS https: //dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee / etc / apt / sources.list.d / yarn.list
Installing Yarn:
sudo apt-get update && sudo apt-get install yarn
Then we need to remove our node_modules folder and install all packages with Yarn:
yarn install
Yarn uses and stores all the packages that were installed in your local cache. When you are installing the package, Yarn is looking for the package in the local cache, and if the package is not found, then Yarn tries to download it from the Internet.
In order to perform the Yarn upgrade, run:
curl --compressed -o- -L https://yarnpkg.com/install.sh | bash
Yarn is also pretty easy to navigate. If you want to see all licenses for the packages installed with Yarn, use the command :
yarn licenses list
A pretty useful tool that Yarn offers is the possibility to install packages globally on your operating system (using the Yarn global prefix for your commands).