Skip to content

Commit 7d3f3a4

Browse files
committed
docs: add tip for yarn 2 (close #200)
1 parent 70e9a57 commit 7d3f3a4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

docs/guide/getting-started.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
- [Yarn v1 classic](https://classic.yarnpkg.com/en/) (Optional)
77

88
::: tip
9-
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.
9+
- With [pnpm](https://pnpm.io/), you need to set `shamefully-hoist=true` in your [`.npmrc`](https://pnpm.io/npmrc#shamefully-hoist) file.
10+
- With [yarn 2](https://yarnpkg.com/), you need to set `nodeLinker: 'node-modules'` in your [`.yarnrc.yml`](https://yarnpkg.com/configuration/yarnrc#nodeLinker) file.
1011
:::
1112

1213
## Manual Installation

docs/zh/guide/getting-started.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
- [Yarn v1 classic](https://classic.yarnpkg.com/zh-Hans/) (可选)
77

88
::: tip
9-
如果你使用的是 [pnpm](https://pnpm.io/) ,你可能需要启用 [shamefully-hoist](https://pnpm.io/npmrc#shamefully-hoist) 来避免一些潜在的问题。
9+
- 使用 [pnpm](https://pnpm.io/zh/) 时,你需要在 [`.npmrc`](https://pnpm.io/zh/npmrc#shamefully-hoist) 文件中设置 `shamefully-hoist=true`
10+
- 使用 [yarn 2](https://yarnpkg.com/) 时,你需要在 [`.yarnrc.yml`](https://yarnpkg.com/configuration/yarnrc#nodeLinker) 文件中设置 `nodeLinker: 'node-modules'`
1011
:::
1112

1213
## 手动安装

0 commit comments

Comments
 (0)