react-map-gl icon indicating copy to clipboard operation
react-map-gl copied to clipboard

Dependency warning for @mapbox/mapbox-gl-traffic

Open derwaldgeist opened this issue 5 years ago • 1 comments
trafficstars

Since I added urbica/react-map-gl to my app, I get this npm warning:

@mapbox/[email protected] requires a peer of mapbox-gl@^0.29.0 but none is installed. You must install peer dependencies yourself

However, the package itself depends on >= 0.40.0:

https://github.com/urbica/react-map-gl/blob/master/package.json#L49

and I am using ^1.6.0 which works. How can I get rid of the warning caused by mapbox-gl-traffic, which is an optional dependency?

derwaldgeist avatar Jan 23 '20 09:01 derwaldgeist

In NPM 7 this causes a peer dependency error and requires use of the --force or --legacy-peer-deps flag.

wrdaigle avatar Jul 16 '21 15:07 wrdaigle