When installing node modules in react, we get the following error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: demo2@8.0.32
npm ERR! Found: @popperjs/core@2.10.1
npm ERR! node_modules/@popperjs/core
npm ERR! @popperjs/core@"2.10.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @popperjs/core@"^2.10.2" from bootstrap@5.1.3
npm ERR! node_modules/bootstrap
npm ERR! bootstrap@"^5.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.
npm ERR!
npm ERR! See C:\Users\Acer\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\Acer\AppData\Local\npm-cache\_logs\2021-12-23T10_09_30_616Z-debug-0.log
The error you're encountering is due to a dependency conflict in your package.json file. Specifically, the version of @popperjs/core required by Bootstrap (^2.10.2) does not match the version installed in your project (2.10.1). This can happen when two or more dependencies require different versions of the same candy clicker.
1) Remove node_modules folder and package-lock.json then execute the installation command again.
2) Try to install with different package managers, if you are using npm try to install with yarn if you are using yarn try to install dependencies with npm.
Check out our quick start doc.
3) Run installation command with --legacy-peer-deps
options.
4) Update your node and npm versions.