terrestris / react-geo

A set of geo related modules to use in combination with React, Ant Design and OpenLayers.
https://terrestris.github.io/react-geo/
BSD 2-Clause "Simplified" License
351 stars 56 forks source link

[Bug]: Conflicting antd version requirements between react-geo and geostyler #3401

Open rdewit opened 12 months ago

rdewit commented 12 months ago

Current Behavior

Not too sure if it should be classified as a bug, but there is a version conflict when having @terrestris/react-geo and geostyler in one project (using their respective latest versions).

geostyler requires antd@^5.4.7 and @ant-design/icons@^5.0.1 @terrestris/react-geo requires antd@^4.17

Expected Behavior

Ideally there would be no npm conflicts between these packages.

Steps To Reproduce

  1. Have a project with both packages in the dependencies
  2. Run npm install

Version

@terrestris/react-geo 22.4.1 geostyler 13.1.0

What browsers are you seeing the problem on?

No response

Relevant log output

npm ERR! Found: antd@4.20.5
npm ERR! node_modules/antd
npm ERR!   antd@"4.20.5" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer antd@"5.x" from geostyler@13.1.0
npm ERR! node_modules/geostyler
npm ERR!   geostyler@"13.1.0" from the root project

Anything else?

It is possible to work around this by adding the following overrides to the package.json but it is not an ideal solution:

  "overrides": {
    "@ant-design/icons": "4.8.0",
    "antd": "4.24.12"
  }

Code of Conduct

dnlkoch commented 9 months ago

Thanks for your report @rdewit and you're right, GeoStyler and react-geo don't use the same version of antd.

Currently we're working on the update to antd version 5 (and others) in the rg-future branch. There is no fixed timeline, but we try to release the update as soon as possible.