Important: This documentation covers Yarn 2. For the 1.x doc, check
1 - Introduction2 - Installation3 - Usage

2 - Installation

Migrating from Yarn 1

We've been compiling helpful advices when porting over from Yarn 1 on the following Migration Guide. Give it a look and contribute to it if you see things that aren't covered yet!

Global Install

Installing Yarn 2.x globally is discouraged as we're moving to a per-project install strategy. We advise you to keep Yarn 1.x (Classic) as your global binary by installing it via the instructions you can find here.

Once you've followed the instructions (running yarn --version from your home directory should yield something like 1.22.0), go to the next section to see how to enable Yarn 2 on your project.

Per-project install

  1. Follow the global install instructions

  2. Move into your project folder:

cd ~/path/to/project
  1. Run the following command:
yarn set version berry
  1. Commit the .yarn and .yarnrc.yml changes

Installing the latest build fresh from master

  1. Follow the per-project install instructions

  2. Run the following comand (add --no-minify if you want an unminified build):

yarn set version from sources