eclipsesource / jsonforms

Customizable JSON Schema-based forms with React, Angular and Vue support out of the box.
http://jsonforms.io
Other
2.22k stars 373 forks source link

Dependency conflict following the Create a JSON Form App instructions #2364

Closed rbavery closed 3 months ago

rbavery commented 3 months ago

Describe the bug

I followed the instructions using the same version of node used by JSON Forms. But I got various dependency conflicts.

https://jsonforms.io/docs/tutorial/

Expected behavior

the install suceeds and I can build and run the app

Steps to reproduce the issue

  1. Go to https://jsonforms.io/docs/tutorial/
  2. follow instructions to make a new app
  3. try to install dependencies
  4. See error

Screenshots

# ryanavery at Ryans-MacBook-Pro.local in ~ [18:30:42]
→ cd my-jsonforms-app

(base) 
# ryanavery at Ryans-MacBook-Pro.local in ~/my-jsonforms-app on git:main ● [18:31:33]
→ nvm use 18.19.0

zsh: command not found: nvm
(base) 
# ryanavery at Ryans-MacBook-Pro.local in ~/my-jsonforms-app on git:main ● [18:31:43]
→ nvm install 18.19.0

zsh: command not found: nvm
(base) 
# ryanavery at Ryans-MacBook-Pro.local in ~/my-jsonforms-app on git:main ● [18:31:58]
→ cd ..              
(base) 
# ryanavery at Ryans-MacBook-Pro.local in ~ [18:32:04]
→ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 15916  100 15916    0     0   166k      0 --:--:-- --:--:-- --:--:--  165k
=> nvm is already installed in /Users/ryanavery/.nvm, trying to update using git
=> => Compressing and cleaning up git repository

=> nvm source string already in /Users/ryanavery/.zshrc
=> bash_completion source string already in /Users/ryanavery/.zshrc
=> Close and reopen your terminal to start using nvm or run the following to use it now:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
(base) 
# ryanavery at Ryans-MacBook-Pro.local in ~ [18:32:06]
→ source ~/.nvm/nvm.sh

(base) 
# ryanavery at Ryans-MacBook-Pro.local in ~ [18:32:10]
→ cd my-jsonforms-app

(base) 
# ryanavery at Ryans-MacBook-Pro.local in ~/my-jsonforms-app on git:main ● [18:32:13]
→ nvm install 18.19.0

Downloading and installing node v18.19.0...
Downloading https://nodejs.org/dist/v18.19.0/node-v18.19.0-darwin-arm64.tar.xz...
######################################################################### 100.0%
Computing checksum with shasum -a 256
Checksums matched!
Now using node v18.19.0 (npm v10.2.3)
(base) 
# ryanavery at Ryans-MacBook-Pro.local in ~/my-jsonforms-app on git:main ● [18:32:23]
→ nvm use 18.19.0

Now using node v18.19.0 (npm v10.2.3)
(base) 
# ryanavery at Ryans-MacBook-Pro.local in ~/my-jsonforms-app on git:main ● [18:32:24]
→ npm install --save @jsonforms/core
npm install --save @jsonforms/react
npm install --save @jsonforms/material-renderers
npm install --save @jsonforms/examples

npm install --save @mui/material
npm install --save @mui/icons-material
npm install --save @mui/x-date-pickers

npm install --save @emotion/styled
npm install --save @emotion/react 

added 3 packages, and audited 1524 packages in 2s

261 packages are looking for funding
  run `npm fund` for details

8 vulnerabilities (2 moderate, 6 high)

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

added 1 package, and audited 1525 packages in 2s

261 packages are looking for funding
  run `npm fund` for details

8 vulnerabilities (2 moderate, 6 high)

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

added 45 packages, and audited 1570 packages in 7s

271 packages are looking for funding
  run `npm fund` for details

8 vulnerabilities (2 moderate, 6 high)

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

added 2 packages, and audited 1572 packages in 2s

271 packages are looking for funding
  run `npm fund` for details

8 vulnerabilities (2 moderate, 6 high)

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

up to date, audited 1572 packages in 1s

271 packages are looking for funding
  run `npm fund` for details

8 vulnerabilities (2 moderate, 6 high)

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

up to date, audited 1572 packages in 1s

271 packages are looking for funding
  run `npm fund` for details

8 vulnerabilities (2 moderate, 6 high)

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: my-jsonforms-app@0.1.0
npm WARN Found: @mui/x-date-pickers@6.20.2
npm WARN node_modules/@mui/x-date-pickers
npm WARN   peer @mui/x-date-pickers@"^6.0.0" from @jsonforms/material-renderers@3.3.0
npm WARN   node_modules/@jsonforms/material-renderers
npm WARN     @jsonforms/material-renderers@"^3.3.0" from the root project
npm WARN   1 more (the root project)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer @mui/x-date-pickers@"^6.0.0" from @jsonforms/material-renderers@3.3.0
npm WARN node_modules/@jsonforms/material-renderers
npm WARN   @jsonforms/material-renderers@"^3.3.0" from the root project

changed 1 package, and audited 1572 packages in 1s

271 packages are looking for funding
  run `npm fund` for details

8 vulnerabilities (2 moderate, 6 high)

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @jsonforms/material-renderers@3.3.0
npm ERR! Found: @mui/x-date-pickers@7.11.1
npm ERR! node_modules/@mui/x-date-pickers
npm ERR!   @mui/x-date-pickers@"^7.11.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @mui/x-date-pickers@"^6.0.0" from @jsonforms/material-renderers@3.3.0
npm ERR! node_modules/@jsonforms/material-renderers
npm ERR!   @jsonforms/material-renderers@"^3.3.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: @mui/x-date-pickers@6.20.2
npm ERR! node_modules/@mui/x-date-pickers
npm ERR!   peer @mui/x-date-pickers@"^6.0.0" from @jsonforms/material-renderers@3.3.0
npm ERR!   node_modules/@jsonforms/material-renderers
npm ERR!     @jsonforms/material-renderers@"^3.3.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:
npm ERR! /Users/ryanavery/.npm/_logs/2024-07-27T01_33_10_518Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /Users/ryanavery/.npm/_logs/2024-07-27T01_33_10_518Z-debug-0.log
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @jsonforms/material-renderers@3.3.0
npm ERR! Found: @mui/x-date-pickers@7.11.1
npm ERR! node_modules/@mui/x-date-pickers
npm ERR!   @mui/x-date-pickers@"^7.11.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @mui/x-date-pickers@"^6.0.0" from @jsonforms/material-renderers@3.3.0
npm ERR! node_modules/@jsonforms/material-renderers
npm ERR!   @jsonforms/material-renderers@"^3.3.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: @mui/x-date-pickers@6.20.2
npm ERR! node_modules/@mui/x-date-pickers
npm ERR!   peer @mui/x-date-pickers@"^6.0.0" from @jsonforms/material-renderers@3.3.0
npm ERR!   node_modules/@jsonforms/material-renderers
npm ERR!     @jsonforms/material-renderers@"^3.3.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:
npm ERR! /Users/ryanavery/.npm/_logs/2024-07-27T01_33_11_410Z-eresolve-report.txt
(base) 
# ryanavery at Ryans-MacBook-Pro.local in ~/my-jsonforms-app on git:main ✖︎ [18:33:16]
→ node -v                                                                        
npm -v

v18.19.0
10.2.3
(base) 
# ryanavery at Ryans-MacBook-Pro.local in ~/my-jsonforms-app on git:main ✖︎ [18:33:33]
→ rm -rf node_modules package-lock.json
npm install --legacy-peer-deps

Which Version of JSON Forms are you using?

v3.3.0

Framework

React

RendererSet

Material

Additional context

I'm on a Mac M1

lucas-koehler commented 3 months ago

Hi @rbavery , thanks for the report! The reason for this is that version 7 of @mui/x-date-pickers has been released but t peer dependency in 3.3.0 still refers to version ^6.0.0. This was already adapted in the code to support 6.x and 7.x and will be fixed in the next (pre-)release.

In the meantime, you can install version 6.x via npm install --save @mui/x-date-pickers@6.

I'll close this as it's fixed in the code. Feel free to reopen or report another issue if you have any concerns :)