zcreativelabs / react-simple-maps

Beautiful React SVG maps with d3-geo and topojson using a declarative api.
https://www.react-simple-maps.io/
MIT License
3.07k stars 424 forks source link

react-simple-maps not installing #283

Closed Rehan989 closed 2 years ago

Rehan989 commented 2 years ago

npm WARN config global --global, --local are deprecated. Use --location=global instead. npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: prospectsq@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! npm ERR! Could not resolve dependency: npm ERR! peer react@"^16.8.0 || 17.x" from react-simple-maps@2.3.0 npm ERR! node_modules/react-simple-maps npm ERR! react-simple-maps@"*" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! See C:\Users\%user%\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\%user%\AppData\Local\npm-cache_logs\2022-06-08T15_48_21_139Z-debug-0.log

While installing react-simple maps

My package.json: { "name": "prospectsq", "version": "0.1.0", "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start", "lint": "next lint", "watch:css": "npx tailwindcss -i ./styles/tailwind.css -o ./styles/main.css --watch", "css": "npx tailwindcss -i ./styles/tailwind.css -o ./styles/main.css" }, "dependencies": { "@headlessui/react": "^1.6.4", "@heroicons/react": "^1.0.6", "next": "12.1.6", "react": "^18.1.0", "react-dom": "^18.1.0", "react-tooltip": "^4.2.21" }, "devDependencies": { "@types/react": "^18.0.12", "@types/react-dom": "^18.0.5", "eslint": "8.17.0", "eslint-config-next": "12.1.6", "tailwindcss": "^3.0.24" } }

saewitz commented 2 years ago

you can install it with npm i react-simple-maps --legacy-peer-deps, more info: https://stackoverflow.com/questions/64573177/unable-to-resolve-dependency-tree-error-when-installing-npm-packages

Rehan989 commented 2 years ago

Thank you

zimrick commented 2 years ago

See #284 for more info on this.