Skip to content

Commit

Permalink
feat: ban npm to solve potential bugs (#296)
Browse files Browse the repository at this point in the history
Signed-off-by: turbodog03 <63595854+turbodog03@users.noreply.github.com>
  • Loading branch information
turbodog03 committed Sep 17, 2021
1 parent 69794fe commit 08eaf29
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ Casdoor provides two run modes, the difference is binary size and user prompt.
Edit `conf/app.conf`, set `runmode=dev`. Firstly build front-end files:

```bash
cd web/ && npm install && npm run start
cd web/ && yarn && yarn run start
```
*❗ A word of caution ❗: the `npm` commands above need a recommended system RAM of at least 4GB. It has a potential failure during building the files if your RAM is not sufficient.*
*❗ A word of caution ❗: Casdoor's front-end is built using yarn. You should use `yarn` instead of `npm`. It has a potential failure during building the files if you use `npm`.*

Then build back-end binary file, change directory to root(Relative to casdoor):

Expand All @@ -103,7 +103,7 @@ That's it! Try to visit http://127.0.0.1:7001/. :small_airplane:
Edit `conf/app.conf`, set `runmode=prod`. Firstly build front-end files:

```bash
cd web/ && npm install && npm run build
cd web/ && yarn && yarn run build
```

Then build back-end binary file, change directory to root(Relative to casdoor):
Expand Down
3 changes: 2 additions & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"build": "craco build",
"test": "craco test",
"eject": "craco eject",
"crowdin:sync": "crowdin upload && crowdin download"
"crowdin:sync": "crowdin upload && crowdin download",
"preinstall": "npx use-yarn -m 'Please use yarn!'"
},
"eslintConfig": {
"extends": "react-app"
Expand Down

0 comments on commit 08eaf29

Please sign in to comment.