alex3165 / react-mapbox-gl

A React binding of mapbox-gl-js
http://alex3165.github.io/react-mapbox-gl/
MIT License
1.93k stars 536 forks source link

package not working with React 18 #1034

Open Abdelaziz-Elshrkawy opened 4 months ago

Abdelaziz-Elshrkawy commented 4 months ago

i tried to install the package with react 18.3.3 and i got error like this

npm error code ERESOLVE npm error ERESOLVE unable to resolve dependency tree npm error npm error While resolving: mapbox@0.0.0 npm error Found: react@undefined npm error node_modules/react npm error react@"^18.3.3" from the root project npm error npm error Could not resolve dependency: npm error peer react@"^16.11.0" from react-mapbox-gl@5.1.1 npm error node_modules/react-mapbox-gl npm error react-mapbox-gl@"^5.1.1" from the root project npm error npm error Fix the upstream dependency conflict, or retry npm error this command with --force or --legacy-peer-deps npm error to accept an incorrect (and potentially broken) dependency resolution. npm error npm error npm error For a full report see: npm error C:\Users\abdelaziz.ibrahim\scoop\persist\nodejs\cache_logs\2024-07-21T08_52_54_255Z-eresolve-report.txt npm error A complete log of this run can be found in: C:\Users\abdelaziz.ibrahim\scoop\persist\nodejs\cache_logs\2024-07-21T08_52_54_255Z-debug-0.log

i have to install react 16.11.0 to make it work but i need to work with react 18