Skip to content

peer depencencies forcing to npm install --force #24

@barbalex

Description

@barbalex

With react-leaflet-bing-v2 in package.json and a recent version of react this error occurs when running npm i:

PS C:\Users\alexa\apf2> npm i
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@"^15.0.0 || ^16.0.0 || ^17.0.0" from [email protected]
npm ERR! node_modules/react-leaflet-bing-v2
npm ERR!   react-leaflet-bing-v2@"5.2.3" 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.

As react-leaflet-bing-v2 works just fine (for us) in react v18.2.0, updating it's version in https://github.com/TA-Geoforce/react-leaflet-bing-v2/blob/master/package.json#L40-L41 seems the thing to do.

Edit: Same for the react-leaflet dependency. It works just fine in the recent version of 4.2.1.

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