Skip to content

Commit

Permalink
Clarify set version berry commands (#1863)
Browse files Browse the repository at this point in the history
* Clarify set version berry commands

User should run _only one_ of the set version berry commands

* Update install.md

Co-authored-by: Maël Nison <[email protected]>
  • Loading branch information
devinrhode2 and arcanis authored Sep 23, 2020
1 parent a40c412 commit 290c685
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/gatsby/content/getting-started/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ title: "2 - Installation"
# This code block gets replaced with the Table of Contents
```

## Global Install
## About global installs

Using a single package manager across your system has always been a problem. To be stable, installs need to be run with the same package manager version across environments, otherwise there's a risk we introduce accidental breaking changes between versions - after all, that's why the concept of lockfile was introduced in the first place! And with Yarn being in a sense your very first project dependency, it should make sense to "lock it" as well.

Expand All @@ -28,19 +28,22 @@ Once you've followed the instructions (running `yarn --version` from your home d
## Per-project install

1. Follow the global install instructions
1. Install the Yarn global binary to its latest version:

```bash
npm install -g yarn
```

2. Move into your project folder:

```bash
cd ~/path/to/project
```

3. Run the following command:
3. Run the following:

```bash
yarn policies set-version berry # below v1.22
yarn set version berry # on v1.22+
yarn set version berry
```

> "Berry" is the codename for the Yarn 2 release line. It's also the name of our [repository](https://github.com/yarnpkg/berry)!
Expand Down

0 comments on commit 290c685

Please sign in to comment.