0
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: aid-frontend@0.1.0
npm ERR! Found: react@16.14.0
npm ERR! node_modules/react
npm ERR!   react@"^16.8.6" from the root project
npm ERR!   peer react@">=16.8.6" from @chakra-ui/checkbox@1.7.1
npm ERR!   node_modules/@chakra-ui/checkbox
npm ERR!     @chakra-ui/checkbox@"^1.0.0" from the root project
npm ERR!   2 more (@emotion/react, @emotion/styled)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@">=18" from @chakra-ui/system@2.3.0
npm ERR! node_modules/@chakra-ui/system
npm ERR!   peer @chakra-ui/system@">=1.0.0" from @chakra-ui/checkbox@1.7.1
npm ERR!   node_modules/@chakra-ui/checkbox
npm ERR!     @chakra-ui/checkbox@"^1.0.0" 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 /home/timjini/.npm/eresolve-report.txt for a full report.

I have tried so many diffent ways to solve this issue but it still persists

My dependencies


"dependencies": { "@chakra-ui/checkbox": "^1.0.0", "@chakra-ui/icons": "^1.0.0", "@chakra-ui/react": "^1.8.7", "@emotion/react": "^11.0.0", "@emotion/styled": "^11.0.0", "@testing-library/jest-dom": "^5.16.3", "@testing-library/react": "^12.1.4", "@testing-library/user-event": "^13.5.0", "actioncable-js": "^5.0.0-rc2", "axios": "^0.26.1", "bootstrap": "^5.1.3", "chakra-ui": "^0.3.9", "emoji-picker-react": "^3.5.1", "formik": "^2.2.9", "framer-motion": "^6.2.8", "google-map-react": "^2.1.10", "js-logger": "^1.6.1", "leaflet": "^1.8.0", "ramda": "^0.28.0", "react": "^16.8.6", "react-bootstrap": "^2.2.2", "react-bootstrap-validation": "^0.1.11", "react-dom": "^16.8.6", "react-leaflet": "^4.0.0", "react-router-dom": "^5.2.0", "react-scripts": "5.0.0", "react-search-box": "^2.3.0", "web-vitals": "^2.1.4", "yup": "^0.32.11" },


Solve Chakra UI dependency issues

timjini
  • 55
  • 1
  • 6
  • Please refer to this solution here it worked for me : [link here](https://stackoverflow.com/questions/71582397/eresolve-unable-to-resolve-dependency-tree-while-installing-a-pacakge) – timjini Oct 27 '22 at 11:13

1 Answers1

1

Chakra UI 2 only compatible with react 18. Your react seems outdated. Chakra UI has simple installation. You do not need such trash dependencies. Just delete all the project and try this line which is on the official website:

npm i @chakra-ui/react @emotion/react @emotion/styled framer-motion
  • I though that at first would fix, but it didn't I just deleted modules and reset npm with --legacy-peer-deps and this time it worked. thank you. – timjini Oct 27 '22 at 11:12