Install via npm
It is recommended to install Yarn through the npm package manager, which comes bundled with Node.js when you install it on your system.
Once you have npm installed you can run the following both to install and upgrade Yarn:
npm install --global yarn
Check installation
Check that Yarn is installed by running:
yarn --version
-----------------------------------------------------------------------------------------------
yarn是Facebook最近发布的一款依赖包安装工具。Yarn是一个新的快速安全可信赖的可以替代NPM的依赖管理工具。