feat: ban npm to solve potential bugs (#296)

Signed-off-by: turbodog03 <63595854+turbodog03@users.noreply.github.com>
This commit is contained in:
turbodog03 2021-09-17 17:07:31 +08:00 committed by GitHub
parent 69794fe29d
commit 08eaf298c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -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):
@ -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):

View File

@ -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"