I want to delete package-lock.json
file in a module and to use npm install. But while npm install running, I got an error saying "unable to resolve dependency tree".
Whole error: ["unable to resolve dependency tree" while resolving: [email protected] Found: [email protected] node_modules/react-redux react-redux@"7.1.0" from the root project. could not resolve dependency: peer react-redux@"^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0" from [email protected] node_module/reduxform-validators redux-formvalidators @"^2.7.5" from the root project fix the upstream dependency conflict, or retry this command with--force, or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution.
I followed more tutorials and documentations. But I could not solve down it.
There are packages which use some other packages. After npm version 7(my guess), they have added this warning. This is just to inform us about those packages.
To resolve it as it is mentioned use
--force
Whole command:
This should solve your issue and the project should work as expected.