annotorious / annotorious-openseadragon

An OpenSeadragon plugin for annotating high-res zoomable images
https://annotorious.github.io
BSD 3-Clause "New" or "Revised" License
119 stars 43 forks source link

Issues with OSD peer dependency #208

Open raulgabor opened 4 weeks ago

raulgabor commented 4 weeks ago

Hi, I'm currently using OSD v3.1.0 and I would like to update it to the latest version. Unfortunately, when I do this the peer dependency is being overridden and on a clean installation of node_modules I get errors, because the peer dependency is OSD v3 and I have v4. Is there any way I can do the necessary update without forcing the dependency conflict. I might be wrong, but I think updating the peerDependency from package.json might solve the problem and I was wondering if this could be possible. Thank you!

These are the errors I get:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @recogito/annotorious-openseadragon@2.7.15
npm ERR! Found: openseadragon@4.1.0
npm ERR! node_modules/openseadragon
npm ERR!   openseadragon@"^4.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer openseadragon@"^3.0.0" from @recogito/annotorious-openseadragon@2.7.15
npm ERR! node_modules/@recogito/annotorious-openseadragon
npm ERR!   @recogito/annotorious-openseadragon@"^2.7.10" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: openseadragon@3.1.0
npm ERR! node_modules/openseadragon
npm ERR!   peer openseadragon@"^3.0.0" from @recogito/annotorious-openseadragon@2.7.15
npm ERR!   node_modules/@recogito/annotorious-openseadragon
npm ERR!     @recogito/annotorious-openseadragon@"^2.7.10" 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.
rsimon commented 4 weeks ago

Hi, yes, you are right of course. It's only the peerDependencies declaration. (Annotorious itself has been compatible with OSD 4 for a while.) I just pushed a fix & published a new version of the library (2.7.18).