Skip to content

Peer Dependency conflict in React 17 project and npm7 #214

@sterlingwalsh

Description

@sterlingwalsh
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions