react-beautiful-dnd
react-beautiful-dnd copied to clipboard
Cannot install for react 18
In react 18 installed with vite , when installing react-beautiful-dnd, npm err happens.Anyone fix about it?
@types/react-beautiful-dnd cannot be installed for react 18.
webapp$ npm i --save-dev @types/react-beautiful-dnd
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! react@"^18.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.5 || ^17.0.0" from [email protected]
npm ERR! node_modules/react-beautiful-dnd
npm ERR! react-beautiful-dnd@"^13.1.0" from the root project
npm ERR!
Update: deleting node_modules and installing deps again solved the problem.
Update: deleting node_modules and installing deps again solved the problem.
I tried delete node_modules and reinstall deps again, it does not solve the problem for me, until I downgrade React version to 17 again
Update : moving the content of the peer-dependency of [email protected] in package-lock.json solved the problem. moving react From "peerDependencies":{ "react":"^16.8.5 || ^17.0.0" } to -> "Dependencies":{ "react":"18.0.2" }
is there another way to use this in react 18?
Fix this for gods sake. There are no breaking changes just update react in your project.
rade React version to 17 again
Try install with --force
command
npm install react-beautiful-dnd --save --force
Same problem
Same problem
Just update your react-beautiful-dnd dependencies it will solve the problem
rade React version to 17 again
Try install with
--force
command
npm install react-beautiful-dnd --save --force
Will --force cause some other problems?
Same problem
Just update your react-beautiful-dnd dependencies it will solve the problem
In order to have dependencies I need to install it first on react 17, then move to react 18? and after that change the dnd dependencies?
Yes that's what I did, I re-installed react 17.0.2 again , npm install => no problems , then I updated React to 18 npm install = > show the error , then I change the dependencies of react-beautiful-dnd to correspond to React 18 , npm install => no errors . And For your first question : if you do "npm install react-beautiful-dnd --save --force" or "--legacy-peer-deps" it will move react to peerDependencies and ignore all peerDependencies when installing, and each time yo udo npm install you always need to add --force or --legacy-peer-deps
Pleaseee can this be updated
🎉 @hello-pangea/dnd now supports React 18 and react strict mode!
-
npm install @hello-pangea/dnd
- Replace all imports of
react-beautiful-dnd
with@hello-pangea/dnd
- Enjoy :)
Hello! I released a fork of this project which supports React 18.
Run
npm install @hello-pangea/dnd
and replace all imports ofreact-beautiful-dnd
with@hello-pangea/dnd
(I just did a find all and replace)A few changes had to be made to the library to get it to work with React 18's development mode changes. Hoping to continue development there :)
https://github.com/hello-pangea/dnd
Nice! There's any discord/forum to support this lib? I would love to help
Nice! There's any discord/forum to support this lib? I would love to help
Sure sure! Glad you're interested in helping out!
https://discord.gg/3JqZpTFD (note: I just made this so it's pretty empty)
We should probably move things over to the hello-pangea/dnd repo so we don't spam notify people here / get too off topic.
Accepted react versions have been updated. Thanks for the patience on this folks
is there any update?