Skip to content

Commit

Permalink
docs: add details for "pulling code" and "install dependencies" (#5194)
Browse files Browse the repository at this point in the history
Add necessary detailled information for "Pulling code" and "Install
Dependencies", especially for when npm's version >= 7.x,
'--legacy-peer-deps' is always ignored by new comers, which will raise
installation problems as a temporary solution.
  • Loading branch information
Wai-Dung committed May 28, 2023
1 parent edb3609 commit b40777a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,19 @@ the help of [git](https://git-scm.com/download/) and work on that.

### Install Dependencies

You can install all the dependencies listed in `package.json` with `npm`,
when your npm version is 7.X or higher:
You can install all the dependencies listed in `package.json` with `npm`:

```bash
npm i --legacy-peer-deps
npm i
```
> Note: If you DON'T ADD `--legacy-peer-deps`, maybe dependency errors will occur
during installation.
> If there's something wrong related to dependencies happending during the installation,
you can temporarily solve it by adding `--legacy-peer-deps` when your npm version >= 7.X,
and you can submit a PR directly in the "Issues" list to notify the author.

Otherwise, you can install dependencies with the following command:

```bash
npm i
npm i --legacy-peer-deps
```

### Pull Request Guide
Expand Down
12 changes: 5 additions & 7 deletions CONTRIBUTING.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,17 @@

### 安装依赖

你可使用 Node 自带的 `npm` 包管理工具命令安装所有在“package.json”上的必备依赖,
当你的 npm 版本高于等于 7.X 时,你可以使用以下命令:
你可使用 Node 自带的 `npm` 包管理工具命令安装所有在“package.json”上的必备依赖:

```bash
npm i --legacy-peer-deps
npm i
```

> 请注意: 如果你不添加 `--legacy-peer-deps`, 安装过程中可能会出现与依赖性相关的错误。
否则可以直接使用以下命令:
> 请注意: 如你安装过程中看到依赖性相关的错误,而导致安装失败,且你的 npm 版本 >=7.X,临时
解决方案是加上 `--legacy-peer-deps`,然后请及时在 Issues 里边提 PR,告知开发者。

```bash
npm i
npm i --legacy-peer-deps
```

### 提交 Pull Request
Expand Down

0 comments on commit b40777a

Please sign in to comment.