Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mapbox-gl-directions@4.4.1 is not compatible with peer dep mapbox-gl@2.6.1 #299

Open
Yashkanekar opened this issue Mar 21, 2023 · 8 comments

Comments

@Yashkanekar
Copy link

Yashkanekar commented Mar 21, 2023

Could not resolve dependency:
peer mapbox-gl@"^0.41.0 <2.0.0" from @mapbox/mapbox-gl-directions@4.1.1
node_modules/@mapbox/mapbox-gl-directions
@mapbox/mapbox-gl-directions@"^4.1.1" from the root project

@jjankovich2
Copy link

Having the same issue, any luck?

@Yashkanekar
Copy link
Author

The peer dep conflict still persists
i used npm i -force to install the deps forcefullly to get around the strict warning policies of npm

@jjankovich2
Copy link

Did it work? I had issues when trying to force

@kick
Copy link

kick commented May 6, 2023

Did it work? I had issues when trying to force

I also did npm i -force. I'm running NextJS 13.3 React 18. What worked for me was using useSWR to include the component that is loading mapgox-gl-directions

locations.js

import dynamic from "next/dynamic";
const Map = dynamic(() => import("@/components/ui/map"), {
        ssr: false,
    });

map.js

import * as MapboxDirections from "@mapbox/mapbox-gl-directions/dist/mapbox-gl-directions";
`const directions = new MapboxDirections...`

@tonviet712
Copy link

same issue
use npm i -force is not good when you have ci/cd

@knbap-codes
Copy link

any updates on this?

@gerardo-rodriguez
Copy link

Same issue.

$ npm install @mapbox/mapbox-gl-directions --save
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: framework-static@1.1.0
npm ERR! Found: mapbox-gl@2.15.0
npm ERR! node_modules/mapbox-gl
npm ERR!   dev mapbox-gl@"^2.15.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.1
npm ERR! node_modules/@mapbox/mapbox-gl-directions
npm ERR!   @mapbox/mapbox-gl-directions@"*" from the root project

@romainlouvet
Copy link

any updates ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants