mapbox / mapbox-gl-directions

Directions plugin for mapbox-gl-js using Mapbox Directions API.
https://mapbox.com/mapbox-gl-js/example/mapbox-gl-directions/
ISC License
235 stars 124 forks source link

Unable to use with MapBox version v2.6.1 #282

Closed cferrara212 closed 2 years ago

cferrara212 commented 2 years ago

I am not sure what I should do, as the MapBox site directs me to this GIT repository for a directions Plugin, however I can not use this with my MapBox. What can we do to change the version dependency on this, or is there another way to get directions?

cferrara212 commented 2 years ago

Sorry all, I should be more descriptive in my issues. I downgraded my version of MapBox to 1.13.0 and I was still recieving an error stating a dependency issue.

npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: capstone@0.1.0 npm ERR! Found: mapbox-gl@1.13.0 npm ERR! node_modules/mapbox-gl npm ERR! mapbox-gl@"1.13.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer mapbox-gl@"^0.41.0 <2.0.0" from @mapbox/mapbox-gl-directions@4.1.0 npm ERR! node_modules/@mapbox/mapbox-gl-directions 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! See C:\Users\Chris\AppData\Local\npm-cache\eresolve-report.txt for a full report.

This is the same error that I get if I try to install it with version 2.6.1, which I understand is not within the package.json dependency scope. I have tried adding the plugin directly to my package.json file and doing npm i also. Not sure what my problem is here, as the error clearly states that my version of MapboX gl js is lower than 2.0.0

cferrara212 commented 2 years ago

I figured it out, I just needed to use yarn instead of npm....im a new developer