erorr for install some library or pakage in next js

Issue

This Content is from Stack Overflow. Question asked by shaous

enter image description herewhen i install some library and pakages in next js i have a erorr that message of that is : while resolving i find react@18.2.0

error :

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: shop-next-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-scroll-horizontal@1.6.6
npm ERR! node_modules/react-scroll-horizontal
npm ERR! react-scroll-horizontal@”*” 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 /home/shaous/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/shaous/.npm/_logs/2022-09-19T07_12_38_692Z-debug-0.log



Solution

This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?