vankop / jsoneditor-react

react wrapper implementation for https://github.com/josdejong/jsoneditor
MIT License
265 stars 106 forks source link

jsoneditor-react is incompatible with react@"17.0.2" #70

Closed thecassion closed 2 years ago

thecassion commented 2 years ago

When I type npm install --save jsoneditor jsoneditor-react , this is what happen: git:(master) ✗ npm install --save jsoneditor jsoneditor-react npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: unops_frontend@undefined npm ERR! Found: react@17.0.2 npm ERR! node_modules/react npm ERR! react@"17.0.2" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^16.2.0" from jsoneditor-react@3.1.1 npm ERR! node_modules/jsoneditor-react npm ERR! jsoneditor-react@"*" 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

antoniocapelo commented 2 years ago

@thecassion I just had the same issue. Although after forcing the install and testing, it seems it works well with react@17.

@vankop Do you want me to create a PR updating the peerDependencies field?

vankop commented 2 years ago

fixed in 3.1.2 https://github.com/vankop/jsoneditor-react/commit/f763a462691786ca4d5db1bc975c1b628a53ccdf