Skip to content

Commit

Permalink
docs: clarify the zero-installs requirements (#4619)
Browse files Browse the repository at this point in the history
  • Loading branch information
eoingroat authored and merceyz committed May 1, 2023
1 parent 27c1482 commit c270431
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/gatsby/content/features/zero-installs.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ Note that these challenges are not unique to Yarn — you may remember a time wh

In order to make a project zero-install, you must be able to use it as soon as you clone it. This is very easy starting from Yarn 2!

- First, ensure that your project is using [Plug'n'Play](/features/pnp) to resolve dependencies via the cache folder and **not** from `node_modules`.
- First, check that you are using Yarn 2 or later using `yarn --version`. You can change the version with [`yarn set version <version>`](/cli/set/version/)

- Next, ensure that your project is using [Plug'n'Play](/features/pnp) to resolve dependencies via the cache folder and **not** from `node_modules`.

- While in theory you could check-in your `node_modules` folder rather than the cache, in practice the `node_modules` contains a gigantic amount of files that frequently change location and mess with Git's optimizations. By contrast, the Yarn cache contains exactly one file per package, that only change when the packages themselves change.

Expand Down

0 comments on commit c270431

Please sign in to comment.