Skip to content

Commit

Permalink
docs: update wiki to include yarn v4 setup instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
tkajtoch committed Jun 12, 2024
1 parent b96a14c commit 03e8a16
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions wiki/contributing-to-eui/running-eui-locally.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,27 @@ nvm install

### Dependencies

EUI uses `yarn` for dependency management. We use `npm` for release purposes only.
EUI uses [Yarn v4](https://yarnpkg.com/getting-started/install) for dependency management. We use `npm` for release purposes only.

EUI only uses [yarn@v1 (classic)](https://classic.yarnpkg.com/en/docs/install), and not yarn v2 or above. Ensure you are on the correct version via `yarn -v` before installing all dependencies:
Unlike Yarn Classic and other package managers, Yarn v4 isn't supposed to be installed globally.
Instead, it utilizes [corepack](https://nodejs.org/api/corepack.html) - a modern way to manage package managers built straight into Node.js.

First, enable corepack:
```shell
corepack enable
```

`yarn` is now configured on your machine, and you can use it just like any other CLI command.
Corepack will always use the right Yarn version, even when switching branches.

With `yarn` set up and ready to go, use it to install EUI dependencies:

```shell
yarn
```

Remember to run `yarn` whenever you're switching branches to ensure all dependencies are installed and have correct versions.

#### Puppeteer issues

If you're on an Apple arm64 machine and receive an error on `yarn` about Puppeteer/the chromium binary not being available, you have two options:
Expand Down

0 comments on commit 03e8a16

Please sign in to comment.