I’ve been facing an issue with dependencies. I’m using
react-leaflet in my project but turns out I need two different components in two different versions.
I’ll explain further:
One part of my application needs
However, the rest of my code needs
This wasn’t a problem since I used this command to install multiple versions as aliased packages:
npm install leaflet react-leaflet leaflet-legacy@npm:email@example.com react-leaflet-legacy@npm:firstname.lastname@example.org
Everything works fine until I get our well known warning message:
npm WARN email@example.com requires a peer of leaflet@^0.7.0 but none is installed. You must install peer dependencies yourself.
So how can I use both versions in my code but also solve peer dependency issues?
Thanks in advance!