chore: Lock yarn version to classic (#2047)

Enables installing the app with yarn 2+.
This commit is contained in:
sua yoo 2024-08-26 15:30:59 -07:00 committed by GitHub
parent 95969ec747
commit d119e8fd77
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 21 additions and 5 deletions

View File

@ -10,7 +10,7 @@ Instead of rebuilding the entire frontend image to view your UI changes, you can
The frontend development server requires an existing backend that has been deployed locally or is in production. See [Deploying Browsertrix](../deploy/index.md).
### 2. Node.js ≥18 and Yarn 1
### 2. Node.js ≥18
To check if you already have Node.js installed, run the following command in your command line terminal:
@ -18,19 +18,34 @@ To check if you already have Node.js installed, run the following command in you
node --version
```
You should see a version number like `v18.12.1`. If you see a command line error instead of a version number, [install Node.js](https://nodejs.org) before continuing.
You should see a version number like `v18.12.1`. If you see a command line error instead of a version number, [install Node.js](https://nodejs.org/en/download/package-manager) before continuing.
??? question "What if my other project requires a different version of Node.js?"
You can use [Node Version Manager](https://nodejs.org/en/download/package-manager#nvm) to install multiple Node.js versions and switch versions between projects.
To check your Yarn installation:
### 3. Yarn 1 (Classic)
To verify your Yarn installation:
```sh
yarn --version
```
You should see a version number like `1.22.19`. If you do not, [install or upgrade Yarn](https://classic.yarnpkg.com/en/docs/install).
If your Yarn version starts with `1` (e.g. `1.22.22`) you're good to go.
If Yarn isn't installed, install [Yarn 1 (Classic)](https://classic.yarnpkg.com/en/docs/install#mac-stable).
If your Yarn version is `2.0` or greater, run the following from your Browsertrix project directory to enable Yarn 1:
```sh
cd frontend
corepack enable
corepack install
```
Check out the full [Yarn + Corepack installation guide](https://yarnpkg.com/corepack) for more details.
## Quickstart

View File

@ -144,5 +144,6 @@
},
"browserslist": [
"defaults"
]
],
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}