I tried many ways to resolve this from cleaning cache to installing dependancies, like:-
npm install –legacy-peer-deps
npm install @reduxjs/toolkit react-redux
npm install @reduxjs/toolkit react-redux –legacy-peer-deps
npm cache clean –force
npm install –save –legacy-peer-deps
Then I tried to set legacy peer deps true using :- npm config set legacy-peer-deps true
And then I installed legacy peer deps and tried again.
npm install –save –legacy-peer-deps
After this I installed packages like :-
npm i @material-ui/core
npm i @material-ui/icons
and it worked…..
It might show some vulnerabilities but it would run fine.
I was trying to install material ui core and icon package but couldn’t complete it because of issue with dependency tree.
2
Answers
You can try different ways it may work but instead of installing packages again and again
If it is not working then delete your node modules file and again install it. Also check your node and npm version