Unable to resolve dependency tree react - reactjs

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: project#0.1.0
npm ERR! Found: react#18.1.0
npm ERR! node_modules/react
npm ERR! react#"^18.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.0.0 || ^17.0.0" from react-spinners#0.11.0
npm ERR! node_modules/react-spinners
npm ERR! react-spinners#"^0.11.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 C:\Users\Muhammad\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\Muhammad\AppData\Local\npm-cache\_logs\2022-05-19T06_37_06_899Z-debug-0.log

use npm with --legacy-peer-deps like this npm install yourpackage --legacy-peer-deps

Related

npm ERR! ERESOLVE unable to resolve dependency tree?

i trying to install react-typicale but i found errors!
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: my-app#0.1.0
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-typical#0.1.3
npm ERR! node_modules/react-typical
npm ERR! react-typical#"*" 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\2023-02-16T10_02_23_637Z-debug-0.log
i didn't find any responses.

redux-react-session installing package Error

Terminal Error
PS C:\Users\Danial Sama\Downloads\Program Languegs\React Native\danshgah\poroje> npm install redux-react-session
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: poroje#0.1.0
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#"^0.14.0 || ^15.0.0 || ^16.0.0" from redux-react-session#2.6.1
npm ERR! node_modules/redux-react-session
npm ERR! redux-react-session#"*" 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\Danial Sama\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\Danial Sama\AppData\Local\npm-cache\_logs\2022-08-18T06_51_08_504Z-debug-0.log
This Error showing when i wanted to add redux-react-session package
and don't know how to fix it.
Try This.
npm install redux-react-session --legacy-peer-deps
or
npm install --legacy-peer-deps

Installing react native image edit

I have a problem while installing npm package - react image edit and I have an error.
PS C:\editor\Baby_PhotoEditor> npm install react-native-imageedit --save
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: babyphoto3#0.0.1
npm ERR! Found: react#17.0.2
npm ERR! node_modules/react
npm ERR! react#"17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^15.4.2" from react-native-imageedit#1.1.1
npm ERR! node_modules/react-native-imageedit
npm ERR! react-native-imageedit#"*" 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\Данила\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\Данила\AppData\Local\npm-cache\_logs\2022-07-20T21_03_15_534Z-debug-0.log
PS C:\editor\Baby_PhotoEditor>

Error while installing react-toggle in VS Code

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: sortingvisualizerfinal#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#">= 15.3.0 < 18" from react-toggle#4.1.2
npm ERR! node_modules/react-toggle
npm ERR! react-toggle#"*" 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\UTKARSH\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\UTKARSH\AppData\Local\npm-cache\_logs\2022-05-14T18_33_32_540Z-debug.log
Error when I run the command "npm i react-toggle" in VS Code.
I want to import react-toggle

npm i react-push-notification npm ERR

C:\Users\USER\Desktop\Table-of-the-day-v-2\app>npm i react-push-notification
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: app#0.1.0
npm ERR! Found: react#17.0.2
npm ERR! node_modules/react
npm ERR! react#"^17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.8.0" from react-push-notification#1.3.0
npm ERR! node_modules/react-push-notification
npm ERR! react-push-notification#"*" 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\2021-10-08T15_15_54_627Z-debug.log
it's because the package has react v16.8.0 as a dependency and you have installed react v17.0.2 you can use npm i react-push-notification --force and it will install it.

Resources