-
Notifications
You must be signed in to change notification settings - Fork 2k
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-dnd, not compatible with older version of react or react-dom #3137
Comments
How to solve this problem? |
Same issue here. Any updates? |
same problem, hoping for a solution
|
I have gotten past the initial error, but I have to go to the office now and won't be able to look more at this for a while. I'm posting this in case it helps anyone. #1 install the jsx-runtime as itself
#2 add an alias in your webpack config to resolve the reference (NOTE: everything in your webpack config is important, I am listing the full path to the alias to help you find exactly where to -> insert <- the alias -- please don't just copy and paste this block into your webpack config)
This is where I found the idea: facebook/react#20235 |
Problem is I still can't get it to work in my Electron project I've been trying to use react-dnd with this boilerplate and am not having a lot of luck -- I can't get the provider to work https://react-dnd.github.io/react-dnd/docs/api/dnd-provider my wrap (includes are above)
their example:
the error (on a reload)
|
Indeed the solution provided by @ajoslin103 (installing jsx-runtime) cannot work as In fact, Fortunately for us (the folks that have not yet migrated to the version 17 😄), the react team has backported this update for the version 16, 15 and 14. So, in order to fix the issue, you should upgrade react to More info in their blog: https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html#whats-a-jsx-transform |
Thank you !! |
@ArthurKnoep - I don't understand what should be done. I have react version
DndProvider.js (line 17):
But I don't have |
The fact that you don't have |
Yes Webpack Thanks for the quick reply! will get back with more information. |
same question , any solutions ? |
I have the same problem. |
encountered this issue today as well. |
I resolved similar problem by updating React to 18.0.0. |
I was also getting the error
Upgrading React from 16.11 to 16.14 resolved this for me. |
React 17 |
React 18.2.0 with Next 13.1.6 still got the same error |
Upgrading to React 16.14.0 from 16.13.1 worked for me. |
Below is the sandbox link where I'm trying to run react-dnd project with react version "16.8.3" which seems broken
Demo
Error that I get
ModuleNotFoundError
Could not find module in path: 'react/jsx-runtime' relative to '/node_modules/react-dnd/dist/esm/core/DndProvider.js'
The text was updated successfully, but these errors were encountered: