SortableJS / react-sortablejs

React bindings for SortableJS
http://sortablejs.github.io/react-sortablejs/
MIT License
2.05k stars 209 forks source link

Peer Dependency conflict in React 17 project and npm7 #214

Open sterlingwalsh opened 3 years ago

sterlingwalsh commented 3 years ago
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   react@"^17.0.2" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.9.0" from react-sortablejs@6.0.0
npm ERR! node_modules/react-sortablejs
npm ERR!   react-sortablejs@"^6.0.0" 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.

This is due to the updates to npm in NPM 7 https://github.blog/2021-02-02-npm-7-is-now-generally-available/#peer-dependencies and is causing an npm install to fail under npm 7 while working under npm 6

I suspect updating the react and react-dom peer dependencies to "^16.9.0 - 17" should suffice

FritzJo commented 3 years ago

Until this issue is fixed, installing sortablejs with the --force flag worked for me

npm install --save react-sortablejs sortablejs --force
bogdancss commented 3 years ago

any updates on this?

rivu007 commented 2 years ago

it would be nice if you guys could prioritize this issue!