prosemirror-dev-tools
prosemirror-dev-tools copied to clipboard
Issue with React 17 peer dependency
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! peer react@">=16.8.0" from [email protected]
npm ERR! node_modules/prosemirror-dev-tools
npm ERR! dev prosemirror-dev-tools@"*" from the root project
npm ERR! peer react@"17.0.2" from [email protected]
npm ERR! node_modules/react-dom
npm ERR! peer react-dom@">=16.8.0" from [email protected]
npm ERR! node_modules/prosemirror-dev-tools
npm ERR! dev prosemirror-dev-tools@"*" from the root project
npm ERR! 3 more (@emotion/core, @emotion/styled, react-dock)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^15.0.0 || ^16.0.0" from [email protected]
npm ERR! node_modules/prosemirror-dev-tools/node_modules/react-json-tree
npm ERR! react-json-tree@"^0.11.2" from [email protected]
npm ERR! node_modules/prosemirror-dev-tools
npm ERR! dev prosemirror-dev-tools@"*" 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!
Are those dev tools React-dependent? That would be too bad as Prosemirror is not. Indeed, after installing those dev tools 3.0.2 i get a dependency error (I use vanilla JS without React):
Module not found: Error: Can't resolve 'react' in '/myproject/node_modules/unstated/lib'
@ ./node_modules/prosemirror-dev-tools/dist/esm/index.js 3:0-36 26:52-60
Looking at the mentioned line, it says:
import { Provider } from "unstated";
@Javarome see if this PR fixes it for you: https://github.com/d4rkr00t/prosemirror-dev-tools/pull/110
@louisstow Thank you for the #110, It worked for me. Can we hope that it will be merged in the near future?
React 17 has been listed as peer dependency in https://github.com/d4rkr00t/prosemirror-dev-tools/commit/adcf9688dc5f64afcd52e8f2c29b20a67ac06bd8. I guess that #110 is no longer needed.
@louisstow It seems this is still an issue as react-json-tree
is added as a dependency, which explicitly lists React 15-16 as a peer dependency.