From 7d3f3a44dbb9ad4b656861bee18a2e08254dd8ef Mon Sep 17 00:00:00 2001 From: meteorlxy Date: Sat, 12 Jun 2021 14:41:56 +0800 Subject: [PATCH] docs: add tip for yarn 2 (close #200) --- docs/guide/getting-started.md | 3 ++- docs/zh/guide/getting-started.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/guide/getting-started.md b/docs/guide/getting-started.md index e90123703b..6f73436e6a 100644 --- a/docs/guide/getting-started.md +++ b/docs/guide/getting-started.md @@ -6,7 +6,8 @@ - [Yarn v1 classic](https://classic.yarnpkg.com/en/) (Optional) ::: tip -If you are using [pnpm](https://pnpm.io/), you may need to enable [shamefully-hoist](https://pnpm.io/npmrc#shamefully-hoist) to avoid potential issues. +- With [pnpm](https://pnpm.io/), you need to set `shamefully-hoist=true` in your [`.npmrc`](https://pnpm.io/npmrc#shamefully-hoist) file. +- With [yarn 2](https://yarnpkg.com/), you need to set `nodeLinker: 'node-modules'` in your [`.yarnrc.yml`](https://yarnpkg.com/configuration/yarnrc#nodeLinker) file. ::: ## Manual Installation diff --git a/docs/zh/guide/getting-started.md b/docs/zh/guide/getting-started.md index b156b64174..5af800a13b 100644 --- a/docs/zh/guide/getting-started.md +++ b/docs/zh/guide/getting-started.md @@ -6,7 +6,8 @@ - [Yarn v1 classic](https://classic.yarnpkg.com/zh-Hans/) (可选) ::: tip -如果你使用的是 [pnpm](https://pnpm.io/) ,你可能需要启用 [shamefully-hoist](https://pnpm.io/npmrc#shamefully-hoist) 来避免一些潜在的问题。 +- 使用 [pnpm](https://pnpm.io/zh/) 时,你需要在 [`.npmrc`](https://pnpm.io/zh/npmrc#shamefully-hoist) 文件中设置 `shamefully-hoist=true` 。 +- 使用 [yarn 2](https://yarnpkg.com/) 时,你需要在 [`.yarnrc.yml`](https://yarnpkg.com/configuration/yarnrc#nodeLinker) 文件中设置 `nodeLinker: 'node-modules'` 。 ::: ## 手动安装