无法使React-leaflet,leaflet,leaf-markerclusters在ReactJs 16.8上工作

我已将我的应用程序中的ReactJS从v15升级到v16.8。升级后,我可以使mapbox +传单+ leaflet.markerclusters + mapbox + mapbox-gl正常工作。

这是我的package.json:

   "dependencies": {
    "@hot-loader/react-dom": "^16.8.6","@types/react-transition-group": "^4.2.3","ag-grid": "6.4.2","ag-grid-enterprise": "6.4.2","ag-grid-react": "6.4.0","animate.css": "3.5.2","axios": "0.15.3","babel-core": "6.26.3","babel-polyfill": "^6.26.0","bootswatch": "3.3.7","leaflet": "1.0.3","leaflet-providers": "^1.3.1","leaflet.markercluster": "1.0.6","loader-utils": "1.0.3","lodash": "^4.17.15","mapbox-gl": "^0.51.0","mapbox-gl-leaflet": "0.0.3","mixpanel-browser": "2.17.1","moment": "2.18.1","react": "^16.8.6","react-dom": "^16.11.0","react-leaflet": "1.1.6","react-leaflet-markercluster": "1.1.5","react-redux": "^7.1.3",}
}

我已经将Leaflet,react-leaflet,leaflet.markercluster和相关软件包更新为最新版本,但看起来它们之间并不兼容。如果我不更新版本,则传单将与我的reactjs版本(v16.8)不兼容。请帮忙。

以下是进行npm安装的警告:

npm WARN leaflet.markercluster@1.4.1 requires a peer of leaflet@~1.3.1 but none was installed.
npm WARN react-leaflet-markercluster@1.1.8 requires a peer of react-leaflet@^1.4.0 but none was installed.
npm WARN react-redux@4.4.10 requires a peer of redux@^2.0.0 || ^3.0.0 but none was installed.```


wei77316 回答:无法使React-leaflet,leaflet,leaf-markerclusters在ReactJs 16.8上工作

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2972593.html

大家都在问