react-sortablejs icon indicating copy to clipboard operation
react-sortablejs copied to clipboard

Peer Dependency conflict in React 17 project and npm7

Open sterlingwalsh opened this issue 4 years ago • 3 comments

npm ERR! Found: [email protected]
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 [email protected]
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

sterlingwalsh avatar Jun 08 '21 15:06 sterlingwalsh

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

npm install --save react-sortablejs sortablejs --force

FritzJo avatar Jun 23 '21 21:06 FritzJo

any updates on this?

bogdancss avatar Aug 17 '21 16:08 bogdancss

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

rivu007 avatar Apr 21 '22 13:04 rivu007