Skip to content

Commit 0722000

Browse files
committed
- Move explanation to Glossary, referring to Corepack.
- Condense code block - Make a guess about how Volto pins the Yarn version. Need to confirm with @sneridagh.
1 parent c302a1d commit 0722000

File tree

1 file changed

+16
-21
lines changed

1 file changed

+16
-21
lines changed

docs/install/create-project.md

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -137,50 +137,45 @@ For the `fish` shell, see [`nvm.fish`](https://github.com/jorgebucaran/nvm.fish)
137137

138138
#### Yeoman and the Volto boilerplate generator
139139

140-
Install {term}`Yeoman` and the Volto boilerplate generator
140+
Install {term}`Yeoman` and the Volto boilerplate generator.
141141

142142
```shell
143143
npm install -g yo @plone/generator-volto
144144
```
145145

146+
146147
(install-prerequisites-yarn-label)=
147148

148149
#### Yarn
149150

151+
Use {term}`Corepack` to enable Yarn, which was already installed with the {ref}`supported version of Node.js <install-packages-prerequisites-label>`.
152+
150153
1. Open a terminal and type:
151154

152155
```shell
153156
corepack enable
154157
```
155158

156-
From that moment on, `yarn` will be available for you to use in your system.
157-
This is thanks that `yarn` is shipped with NodeJS since Node 16 (along with other common package managers).
158-
The version shipped is v1 (classic `yarn`).
159-
Volto makes sure that you are using the correct version of `yarn` at runtime.
160-
This is because it's pinned in the Volto boilerplate to use the right version.
161-
So from this moment on, you don't have to worry about the version of `yarn` you are using, it will adapt to the project's needs.
162-
163-
````important
164-
These instructions will not work if you have used another package manager, such as Homebrew on macOS, to install Yarn.
165-
You can verify where you installed Yarn and its version.
166-
Make sure that you are using the yarn version provided by NodeJS by default
159+
In your generated Volto project from the previous step, you can find the pinned version of Yarn in its {file}`.yarnrc.yml`.
160+
161+
````{important}
162+
The preceding instructions will not work if you have used another package manager, such as Homebrew on macOS, to install Yarn.
163+
You can verify where you installed Yarn and its version, and compare that to the pinned value of Yarn in your generated Volto project's {file}`.yarnrc.yml`.
164+
167165
```shell
168166
which yarn
169-
```
170-
```console
171-
/opt/homebrew/bin/yarn
172-
```
173-
```shell
167+
# /opt/homebrew/bin/yarn
174168
yarn -v
169+
# 3.2.3
175170
```
176-
```console
177-
3.2.3
178-
```
171+
179172
If the console includes `homebrew` in the path, and the version of Yarn is not supported, then you must uninstall it.
173+
180174
```shell
181175
brew uninstall yarn
182176
```
183-
Now the instructions should work.
177+
178+
Now the instructions to install Yarn should work.
184179
````
185180
186181
(install-prerequisites-make-label)=

0 commit comments

Comments
 (0)