npm install --save --legacy-peer-deps
npm config set legacy-peer-deps true
npm cache clean --force
npm install --legacy-peer-deps
You have dependency conflict (incorrect & potentially broken dependency)
Try to run the command with --force, or --legacy-peer-deps.
If it doesn't take effect, the temporary solution is using prior
versions of the Node.js (downgrading the Node.js version) as
it causes this kind of errors to happen sometimes.
npm config set legacy-peer-deps true
try to run the npm command with --force, or --legacy-peer-deps
EXEMPLE : npm install react-router-dom --force