Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Installation

These instructions only cover Yarn versions prior to 2.0. Those versions entered maintenance mode in January 2020 and will eventually reach their end-of-life in terms of support. Please see the main website for the most up-to-date documentation: yarnpkg.com/getting-started/migration.
The latest Yarn version is: Latest CLI Release
Classic Stable: v1.22.19
Node: ^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0
Before you start using Yarn, you'll first need to install it on your system. There are many different ways to install Yarn, but a single one is recommended and cross-platform:

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

Alternatives

Click to expand / collapse
Loading...

Check installation

Check that Yarn is installed by running:

yarn --version