My project uses Chakra-UI
and React
. When trying to run npm install
, I got this npm error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @choc-ui/chakra-autocomplete@5.1.2
npm ERR! Found: @chakra-ui/react@1.8.8
npm ERR! node_modules/@chakra-ui/react
npm ERR! @chakra-ui/react@"latest" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @chakra-ui/react@"^2.2.8" from @choc-ui/chakra-autocomplete@5.1.2
npm ERR! node_modules/@choc-ui/chakra-autocomplete
npm ERR! @choc-ui/chakra-autocomplete@"^5.1.2" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react@18.2.0
npm ERR! node_modules/react
npm ERR! peer react@">=18" from @chakra-ui/react@2.3.5
npm ERR! node_modules/@chakra-ui/react
npm ERR! peer @chakra-ui/react@"^2.2.8" from @choc-ui/chakra-autocomplete@5.1.2
npm ERR! node_modules/@choc-ui/chakra-autocomplete
npm ERR! @choc-ui/chakra-autocomplete@"^5.1.2" 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.
I don't understand this error, I tried deleting node_modules
and package-lock.json
, ran npm install
again, but same error. Any ideas?