Skip to content

Commit

Permalink
Fix issue with peer deps by using overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
nicou committed Nov 2, 2023
1 parent 0692af9 commit 93a6c70
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install --legacy-peer-deps
- run: npm install
- run: CI=false npm run build

- name: Deploy to server
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

In the project directory, you can run:

### `npm install --legacy-peer-deps`
### `npm install`

At least one of the dependencies does not support React 17 officially.
Installs all the required dependencies.

### `npm start`

Expand Down
13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
"react-scroll": "^1.8.6",
"web-vitals": "^2.1.4"
},
"overrides": {
"react": "$react",
"react-dom": "$react-dom"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
Expand Down

0 comments on commit 93a6c70

Please sign in to comment.