Skip to content

Upgrade peer dependencies to support react-leaflet v4 #33

@argarner

Description

@argarner

Including react-leaflet v4's dependencies of react v18 & leaflet v1.8

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: tco-ui@0.1.0
npm ERR! Found: react@18.1.0
npm ERR! node_modules/react
npm ERR!   react@"^18.1.0" from the root project
npm ERR!   peer react@">=16.8.0" from react-leaflet-google-layer@2.0.5
npm ERR!   node_modules/react-leaflet-google-layer
npm ERR!     react-leaflet-google-layer@"2.0.5" from the root project
npm ERR!   1 more (react-dom)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^17.0.1" from react-leaflet@3.2.5
npm ERR! node_modules/react-leaflet
npm ERR!   react-leaflet@"^3.2.5" from the root project
npm ERR!   peer react-leaflet@"^3.0.0" from react-leaflet-google-layer@2.0.5
npm ERR!   node_modules/react-leaflet-google-layer
npm ERR!     react-leaflet-google-layer@"2.0.5" from the root project

force upgrade results in multiple typescript errors

TS2322: Type '{ apiKey: string; type: string; styles: ({ featureType: string; stylers: { saturation: number; }[]; } | { featureType: string; elementType: string; stylers: { visibility: string; }[]; })[]; }' is not assignable to type 'IntrinsicAttributes & LayerProps & IProps & RefAttributes<GridLayer>'.
  Property 'type' does not exist on type 'IntrinsicAttributes & LayerProps & IProps & RefAttributes<GridLayer>'.
    39 |           <ReactLeafletGoogleLayer
    40 |             apiKey={GOOGLE_MAP_API_KEY}
  > 41 |             type="roadmap"
       |             ^^^^
    42 |             styles={[
    43 |               {
    44 |                 featureType: 'all',

If you're aware of any workaround in the meantime, please advise. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions