bluehalo / ngx-leaflet-draw

MIT License
88 stars 29 forks source link

npm install fails when trying to install latest version #123

Closed aryobenholzner closed 2 years ago

aryobenholzner commented 2 years ago

Trying to update to ngx-leaflet@13.0.2 and ngx-leaflet-draw@13.01 fails because of peer dependency issues.

Repro Steps:

  1. create new app e.g. ng new leaflet13test
  2. add dependencies for ngx-leaflet-draw
    npm install leaflet
    npm install leaflet-draw
    npm install @asymmetrik/ngx-leaflet
  3. try to install ngx-leaflet-draw npm install @asymmetrik/ngx-leaflet-draw

Installation fails with:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: leaflet13@0.0.0
npm ERR! Found: leaflet@1.7.1
npm ERR! node_modules/leaflet
npm ERR!   leaflet@"^1.7.1" from the root project
npm ERR!   peer leaflet@"1" from @asymmetrik/ngx-leaflet@13.0.2
npm ERR!   node_modules/@asymmetrik/ngx-leaflet
npm ERR!     @asymmetrik/ngx-leaflet@"^13.0.2" from the root project
npm ERR!     peer @asymmetrik/ngx-leaflet@"13" from @asymmetrik/ngx-leaflet-draw@13.0.1
npm ERR!     node_modules/@asymmetrik/ngx-leaflet-draw
npm ERR!       @asymmetrik/ngx-leaflet-draw@"*" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer leaflet@"1.0.2" from @asymmetrik/ngx-leaflet-draw@13.0.1
npm ERR! node_modules/@asymmetrik/ngx-leaflet-draw
npm ERR!   @asymmetrik/ngx-leaflet-draw@"*" 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.
npm ERR! 
miclausandrei commented 2 years ago

Same here

reblace commented 2 years ago

There's a typo in the peer dependency list. Fixing it now. Will have a patch out shortly.

reblace commented 2 years ago

Published 13.0.2, should fix this. Pls confirm.

miclausandrei commented 2 years ago

It's working only if i use 1.0.2 for leaflet-draw.

aryobenholzner commented 2 years ago

It's still not working with latest version from leaflet-draw which is 1.0.4. I saw that you have pinned it to version 1.0.2 so it only works with leaflet-draw 1.0.2

I would suggest changing the version to ~1.0.4

reblace commented 2 years ago

I removed the peer dependency lock on leaflet-draw@1.0.2 and published again (v13.0.3).

FYI - There were issues with leaflet-draw 1.0.3 and 1.0.4. At least in Chrome, I noticed that the label anchors for the toolbar actions were not working properly and that I couldn't draw squares.

aryobenholzner commented 2 years ago

Can confirm - it's now working with leaflet-draw 1.0.4.

Closing this Issue.

I haven't noticed any problems with 1.0.4 in Firefox yet, but we are only using polygons in our project. Thanks for the quick solution