From 611cc1433f6bef431262377fd858509d590448c5 Mon Sep 17 00:00:00 2001 From: Dominic Saadi Date: Mon, 27 Nov 2023 15:05:34 -0800 Subject: [PATCH] docs: update prerequisites --- docs/docs/tutorial/chapter1/prerequisites.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/docs/tutorial/chapter1/prerequisites.md b/docs/docs/tutorial/chapter1/prerequisites.md index 4013773b7d2c..e791b79c006e 100644 --- a/docs/docs/tutorial/chapter1/prerequisites.md +++ b/docs/docs/tutorial/chapter1/prerequisites.md @@ -46,14 +46,21 @@ Please do upgrade accordingly. Then proceed to the Redwood installation when you There are many ways to install and manage both Node.js and Yarn. If you're installing for the first time, we recommend the following: -**1. Yarn** -We recommend following the [instructions via Yarnpkg.com](https://yarnpkg.com/getting-started/install). - -**2. Node.js** +**1. Node.js** Using the recommended [LTS version from Nodejs.org](https://nodejs.org/en/) is preferred. - `nvm` is a great tool for managing multiple versions of Node on one system. It takes a bit more effort to set up and learn, however. Follow the [nvm installation instructions](https://github.com/nvm-sh/nvm#installing-and-updating). (Windows users should go to [nvm-windows](https://github.com/coreybutler/nvm-windows/releases)). For **Mac** users with Homebrew installed, you can alternatively use it to [install `nvm`](https://formulae.brew.sh/formula/nvm). Or, refer to our how to guide [using nvm](../../how-to/using-nvm.md). +**2. Yarn** +As of Node.js v18+, Node.js ships with a CLI tool called [Corepack](https://nodejs.org/docs/latest-v18.x/api/corepack.html) to manage package managers. All you have to do is enable it, then you'll have Yarn: + +``` +corepack enable +yarn -v +``` + +The version of Yarn will probably be `1.22.21`, but don't worry—in your Redwood project, Corepack will know to use a modern version of Yarn because of the `packageManager` field in the root `package.json`. + **Windows:** Recommended Development Setup - JavaScript development on Windows has specific requirements in addition to Yarn and npm. Follow our simple setup guide: