React App is giving this error whenever i try to install any dependency and also tried uninstall and reinstall NodeJs but its not working. Its very difficult to distinguish error whats happening.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-dfb@1.0.4
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR! peer react@"*" from @testing-library/react@11.2.7
npm ERR! node_modules/@testing-library/react
npm ERR! @testing-library/react@"^11.2.7" from the root project
npm ERR! peer react@"^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" from mini-create-react-context@0.4.1
npm ERR! node_modules/mini-create-react-context
npm ERR! mini-create-react-context@"^0.4.0" from react-router@5.2.0
npm ERR! node_modules/react-router
npm ERR! react-router@"5.2.0" from react-router-dom@5.2.0
npm ERR! node_modules/react-router-dom
npm ERR! react-router-dom@"^5.2.0" from the root project
npm ERR! 10 more (react-device-detect, react-dom, react-h5-audio-player, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"~16.0.0" from react-dfb@1.0.4
npm ERR! node_modules/react-dfb
npm ERR! react-dfb@"^1.0.4" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react@16.0.0
npm ERR! node_modules/react
npm ERR! peer react@"~16.0.0" from react-dfb@1.0.4
npm ERR! node_modules/react-dfb
npm ERR! react-dfb@"^1.0.4" 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\Md Yasin Ansari\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\Md Yasin Ansari\AppData\Local\npm-cache\_logs\2022-11-13T12_55_52_296Z-debug-0.log