kontent-ai / sample-app-react

Sample React SPA utilizing the Kontent.ai Delivery API to fetch content.
https://kontent-sample-app-react.netlify.app/
MIT License
51 stars 73 forks source link

google-maps-react is not supported in React 17 #198

Open Simply007 opened 2 years ago

Simply007 commented 2 years ago

Brief bug description

google-maps-react is not supported in React 17

Repro steps

  1. Remove node_modules and package-lock.json
  2. Run npm i

Error:

ERESOLVE overriding peer dependency
npm WARN While resolving: google-maps-react@2.0.6
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN   react@"^17.0.2" from the root project
npm WARN   9 more (@simply007org/kontent-react-components, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"~0.14.8 || ^15.0.0 || ^16.0.0" from google-maps-react@2.0.6
npm WARN node_modules/google-maps-react
npm WARN   google-maps-react@"^2.0.6" from the root project
npm WARN
npm WARN Conflicting peer dependency: react@16.14.0
npm WARN node_modules/react
npm WARN   peer react@"~0.14.8 || ^15.0.0 || ^16.0.0" from google-maps-react@2.0.6
npm WARN   node_modules/google-maps-react
npm WARN     google-maps-react@"^2.0.6" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: google-maps-react@2.0.6
npm WARN Found: react-dom@17.0.2
npm WARN node_modules/react-dom
npm WARN   react-dom@"^17.0.2" from the root project
npm WARN   2 more (@simply007org/kontent-react-components, react-scroll)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react-dom@"~0.14.8 || ^15.0.0 || ^16.0.0" from google-maps-react@2.0.6
npm WARN node_modules/google-maps-react
npm WARN   google-maps-react@"^2.0.6" from the root project
npm WARN 
npm WARN Conflicting peer dependency: react-dom@16.14.0
npm WARN node_modules/react-dom
npm WARN   peer react-dom@"~0.14.8 || ^15.0.0 || ^16.0.0" from google-maps-react@2.0.6
npm WARN   node_modules/google-maps-react
npm WARN     google-maps-react@"^2.0.6" from the root project

Expected behavior

No error - try to find an alternative package for the Google Maps component.

IvanKiral commented 2 years ago

We decided to remove the map from the react app. There is commit of not fully completed react component for MapContainer https://github.com/Kentico/kontent-sample-app-react/commit/43df9ad044ee35e4d27aa4929df2f4d5361502a3

It was deleted in the following commit