Support React v17
mottox2 opened this issue · comments
Expected Behavior
No error when I run npm install
on a project that contains React17
Current Behavior
When I run npm install
on a project that contains React17, I get the following error.
$ npm install megadraft
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: draft-editor@0.0.0
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR! react@"^17.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.1.0" from megadraft@0.7.4
npm ERR! node_modules/megadraft
npm ERR! megadraft@"*" 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.
I must run npm install megadraft --force
This error is caused by an outdated draft.js included in megadraft.
Latest draft.js support React17
Steps to Reproduce
- run
npx create-react-app my-app
- run
my-app
- run
npm install megadraft
Browser, device, and OS
- macOS 11.1
- Node.js 15.5.1
- npm 7.7.6
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi @mottox2. We did create a branch updating React to version 17. Enzyme does not have official support for it yet, only with a contributor adapter. Is there a specific reason for version 17 though? It seems to be only a transition version to React18, without any new features. Maybe version 16 would work just fine for your project.