Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Editor will not install with React v17 #1248

Open
live951 opened this issue Oct 30, 2020 · 8 comments
Open

React Editor will not install with React v17 #1248

live951 opened this issue Oct 30, 2020 · 8 comments

Comments

@live951
Copy link

live951 commented Oct 30, 2020

Describe the bug

NPM gives an 'unable to resolve dependency tree' error when attempting to install the react-editor in a project that is using React v17.

To Reproduce

Steps to reproduce the behavior:

  1. Make new React app with npx create-react-app.
  2. Try to install TUI React Editor with: npm install --save @toast-ui/react-editor
  3. See the following error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: testproject@0.1.0
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR!   react@"^17.0.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.0.0" from @toast-ui/react-editor@2.5.0
npm ERR! node_modules/@toast-ui/react-editor
npm ERR!   @toast-ui/react-editor@"*" 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.

Expected behavior

The react-editor should install unless there is something specific to React v17 that makes that not possible until fixed.

@live951 live951 added the Bug label Oct 30, 2020
@seonim-ryu
Copy link
Member

@live951 I'll check this soon and see if the wrapper can update the peer-dependent version to React 17.

@bobbui
Copy link

bobbui commented Dec 17, 2020

@seonim-ryu any update on this? React 17 is compatible with React 16 so a simple version bump will do the job.

@bobbui
Copy link

bobbui commented Feb 16, 2021

ping, any update in this? Highly appreciate if this will be looked at soon , as it basically block the upgrade to React 17 for the whole app.

@mwlpeeters
Copy link

Hi, I'm running into the same problem. Any news about this?

@partoneplay
Copy link

Now React Editor V3.0 will not install with React v16.
React Version V17 is such a stupid version, although is totally compatible with React 16.
Maybe React Editor V3.0 Support React 16. Please.

@lgk-bsw
Copy link

lgk-bsw commented Jul 5, 2021

I created a workaround for me. I created a fork and a branch only containing the react-editor: https://github.com/bruegmann/tui.editor/tree/lgk--react-editor-only. In the package.json I changed the peer dependencies to this to support React 16 and 17:

  "peerDependencies": {
    "react": "^16.0.0 || ^17.0.0"
  },

That's how I use this solution:

npm i github:bruegmann/tui.editor#lgk--react-editor-only

It would be awesome if this change could come to the official package.

@7obias
Copy link

7obias commented Oct 6, 2021

I am coming from nhn/toast-ui.react-image-editor#38
is there a similar fix for the image editor. I need it to work with react 17. Thank you.

@7obias
Copy link

7obias commented Oct 6, 2021

Making some progress. I see that the master branch is already updated to react 17. I was trying to refernce the github masterbranch directly in my package.json like so

npm install "https://github.com/nhn/tui.image-editor.git\#master" --save

leaves my package.json like this.

"dependencies": {
...
"root": "github:nhn/tui.image-editor#master"
},

and I trouble making this import work

import ImageEditor from '@toast-ui/react-image-editor';

any help appriciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants