Skip to content

Commit

Permalink
docs: suggest using volta to manage node and pnpm version
Browse files Browse the repository at this point in the history
  • Loading branch information
sorrycc committed Dec 12, 2024
1 parent 06993d2 commit 6f40439
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
6 changes: 4 additions & 2 deletions docs/docs/docs/introduce/contributing.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ translated_at: '2024-03-17T09:56:34.842Z'

Developing Umi requires Node.js 18+ and `pnpm` v8.

It is recommended to use [`nvm`](https://github.com/nvm-sh/nvm) to manage Node.js versions to avoid permission issues and easily switch between Node.js versions. Windows developers can use [`nvm-windows`](https://github.com/coreybutler/nvm-windows).
It's recommended to use [Volta](https://volta.sh/) to manage the node and pnpm version. And you need to set the `VOLTA_FEATURE_PNPM` environment variable to enable pnpm support.

Install `pnpm` via one of the methods on its [official website](https://pnpm.io/installation).
```bash
export VOLTA_FEATURE_PNPM=1
```

### Clone the Project

Expand Down
6 changes: 4 additions & 2 deletions docs/docs/docs/introduce/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ toc: content

开发 Umi 需要 Node.js 18+ 和 `pnpm` v8。

推荐使用 [`nvm`](https://github.com/nvm-sh/nvm) 管理 Node.js,避免权限问题的同时,还能够随时切换当前使用的 Node.js 的版本。在 Windows 系统下的开发者可以使用 [`nvm-windows`](https://github.com/coreybutler/nvm-windows)
推荐使用 [Volta](https://volta.sh/) 来管理 Node.js 和 pnpm 版本。并且需要设置 `VOLTA_FEATURE_PNPM` 环境变量来启用 pnpm 支持

`pnpm`[官网](https://pnpm.io/installation)选择一种方式安装即可。
```bash
export VOLTA_FEATURE_PNPM=1
```

### Clone 项目

Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@
"node": ">=14",
"pnpm": "^8.11.0"
},
"volta": {
"node": "20.18.1",
"pnpm": "8.15.9"
},
"//": {
"why-overrides-parcel-watcher": "https://github.com/parcel-bundler/watcher/issues/156",
"why-overrides-browserslist": "See scripts/bundleDeps.ts"
Expand Down

0 comments on commit 6f40439

Please sign in to comment.