mapbox-gl-directions icon indicating copy to clipboard operation
mapbox-gl-directions copied to clipboard

[email protected] is not compatible with peer dep [email protected]

Open Yashkanekar opened this issue 2 years ago • 8 comments

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

Yashkanekar avatar Mar 21 '23 07:03 Yashkanekar

Having the same issue, any luck?

jjankovich2 avatar Apr 06 '23 21:04 jjankovich2

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

Yashkanekar avatar Apr 07 '23 15:04 Yashkanekar

Did it work? I had issues when trying to force

jjankovich2 avatar Apr 10 '23 23:04 jjankovich2

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...`

kick avatar May 06 '23 17:05 kick

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

tonviet712 avatar Jul 06 '23 05:07 tonviet712

any updates on this?

knbap-codes avatar Jul 28 '23 10:07 knbap-codes

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: [email protected]
npm ERR! Found: [email protected]
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/[email protected]
npm ERR! node_modules/@mapbox/mapbox-gl-directions
npm ERR!   @mapbox/mapbox-gl-directions@"*" from the root project

gerardo-rodriguez avatar Sep 21 '23 04:09 gerardo-rodriguez

any updates ?

romainlouvet avatar Oct 26 '23 05:10 romainlouvet