maplibre / maplibre-gl-directions

A plugin to show routing directions on a MapLibre GL JS map
https://maplibre.org/maplibre-gl-directions/
MIT License
72 stars 16 forks source link

peer dependence error peer maplibre-gl@4.1.2" from @maplibre/maplibre-gl-directions@0.6.1 #225

Closed farney9 closed 4 months ago

farney9 commented 5 months ago

I'm trying to implement @maplibre/maplibre-gl-directions pluggin in my Angular 17.2.0 app but when i execute the command

npm i @maplibre/maplibre-gl-directions --legacy--peer-deps

I get the next error

npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: angular-mapas@0.0.0 npm ERR! Found: maplibre-gl@4.1.2 npm ERR! node_modules/maplibre-gl npm ERR! maplibre-gl@"^4.1.2" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer maplibre-gl@"^3.0.0" from @maplibre/maplibre-gl-directions@0.6.1 npm ERR! node_modules/@maplibre/maplibre-gl-directions npm ERR! @maplibre/maplibre-gl-directions@"*" 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! npm ERR! npm ERR! For a full report see: npm ERR! C:\Users\OMEN\AppData\Local\npm-cache\_logs\2024-04-11T00_00_03_317Z-eresolve-report.txt

In my project, I'm using the follow versions:

Angular CLI: 17.2.0 Node: 20.11.1 Package Manager: npm 10.5.0

in package.json

"dependencies": { "@angular/animations": "^17.2.0", "@angular/common": "^17.2.0", "@angular/compiler": "^17.2.0", "@angular/core": "^17.2.0", "@angular/forms": "^17.2.0", "@angular/platform-browser": "^17.2.0", "@angular/platform-browser-dynamic": "^17.2.0", "@angular/router": "^17.2.0", "@types/maplibre-gl": "^1.14.0", "maplibre-gl": "^4.1.2", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.14.3" },

I don't want to downgrade my maplibre-gl version 😥

image

Has maplibre an Api for directions like Mapbox?

Thanks guys!!

smellyshovel commented 5 months ago

I guess the issue is that the directions plugin hasn't yet been updated to support maplibre 4. I have I plan to do that (for a long time already), but don't have enough time to actually do it. You're welcome to help me we that, if you'd like to. Otherwise, I guess, I'll update it during the next week.

adamcohenhillel commented 4 months ago

Hey @smellyshovel - that would be awesome! looking forward to it (would've try and help myself, but im not too familiar with maplibre code, etc.)

smellyshovel commented 4 months ago

@adamcohenhillel @farney9 started going in that direction. I'll release the last version with the updated deps to support MapLibre v3 first, and then there's gonna be a separate release with v4 support.

I'll let you know as soon as it's ready.

https://github.com/maplibre/maplibre-gl-directions/pull/226

smellyshovel commented 4 months ago

@adamcohenhillel @farney9 done. https://github.com/maplibre/maplibre-gl-directions/releases/tag/v0.7.0 Feel free to update to 0.7.0 and don't hesitate to open an issue if something's broken there

adamcohenhillel commented 4 months ago

Thank you very much @smellyshovel !!

farney9 commented 4 months ago

Thanks a lot @smellyshovel !!