react-scroll-to-bottom icon indicating copy to clipboard operation
react-scroll-to-bottom copied to clipboard

can not install through npm

Open shadigaafar opened this issue 3 years ago • 2 comments

Hi, i tried to install it but it is now woking, i get this error: `npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/react npm ERR! react@"^17.0.1" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^16.8.6" from [email protected] npm ERR! node_modules/react-scroll-to-bottom npm ERR! react-scroll-to-bottom@"*" 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\Shadi\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\Shadi\AppData\Local\npm-cache_logs\2021-03-20T12_03_02_358Z-debug.log PS D:\chat_app\client> npm i [email protected] npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/react npm ERR! react@"^17.0.1" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^16.8.6" from [email protected] npm ERR! node_modules/react-scroll-to-bottom npm ERR! react-scroll-to-bottom@"3.0.0" 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\Shadi\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\Shadi\AppData\Local\npm-cache_logs\2021-03-20T12_03_18_656Z-debug.log PS D:\chat_app\client> npm i [email protected] npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/react npm ERR! react@"^17.0.1" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^16.8.6" from [email protected] npm ERR! node_modules/react-scroll-to-bottom npm ERR! react-scroll-to-bottom@"2.0.0" 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\SSSS\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\SSSS\AppData\Local\npm-cache_logs\2021-03-20T12_03_46_506Z-debug.log`

I'm useing this version of react: "react": "^17.0.1",

shadigaafar avatar Mar 20 '21 12:03 shadigaafar

Any solution? @compulim It is because of npm>=7.

Temporary solution: npm i react-scroll-to-bottom --force

theoludwig avatar Apr 07 '21 07:04 theoludwig

@shadigaafar You should post your package.json if you want others to be able to help further.

@compulim I think you should consider adding React 17+ to the peer dependency rule. This will ensure peer dependencies match anyone using React 17+. The React team has stated that 17.0+ is fully backwards compatible, so this should be 100% safe to do.

under components/package.json:

  "peerDependencies": {
    "react": "^16.8.6 || 17"
  }

justinbhopper avatar May 16 '21 15:05 justinbhopper