ferdaber/react-focus-within

react peerDep is outdated, causes npm installation issue

barbalex opened this issue · 0 comments

When running npm i when react-focus-within is a dependency, this error occurs and installation stops:

PS C:\Users\alexa\apf2> npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: apflora@1.101.9
npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR!   react@"18.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^15.0.0 || ^16.0.0" from react-focus-within@2.0.2
npm ERR! node_modules/react-focus-within
npm ERR!   react-focus-within@"2.0.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.

This forces to use npm i --force which is not recommended.