brainhubeu / react-carousel

A pure extendable React carousel, powered by Brainhub (craftsmen who ❤️ JS)
https://brainhub.eu/
MIT License
1.07k stars 164 forks source link

Install warning: @brainhubeu/react-carousel@2.0.2" has incorrect peer dependency "react@^16.8.0" #668

Open astriskit opened 3 years ago

astriskit commented 3 years ago

Describe the bug Adding the library to the project logs warning of incorrect peer-dependency - react@^16.8.0

To Reproduce Steps to reproduce the behavior:

  1. yarn add @brainhubeu/react-carousel@^2
  2. After the install is done, the warning could be seen on the console.

Expected behavior Shouldn't show the warning.

Screenshots If applicable, add screenshots to help explain your problem.

Environment - linux-based os with node@^12

txm3278 commented 3 years ago

This breaks installation on newest versions of npm with the error. The fix would be to update the peer dependencies to allow the newest version of react

npm ERR! Could not resolve dependency: npm ERR! peer react@"^16.8.0" from @brainhubeu/react-carousel@2.0.3 npm ERR! node_modules/@brainhubeu/react-carousel npm ERR! @brainhubeu/react-carousel@"^2.0.3" 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.`

anthonyrovira commented 3 years ago

Hi, same issue here:

$ npm i @brainhubeu/react-carousel
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: myproject-next@0.1.0    
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   react@"17.0.2" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.0" from @brainhubeu/react-carousel@2.0.3
npm ERR! node_modules/@brainhubeu/react-carousel
npm ERR!   @brainhubeu/react-carousel@"*" 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!
...

Too bad, it looked great

Lokom17 commented 3 years ago

The same

tonystanktinio commented 3 years ago

It works on yarn, not in "npm i @brainhubeu/react-carousel". Try to install yarn and after that yarn add @brainhubeu/react-carousel.

aishwaryakarad commented 2 years ago

I'm also getting the same error. My current react version is 18.1.0

Screen Shot 2022-05-05 at 2 26 22 PM
JulioMARIE commented 2 years ago

I get the same.Please how to fix...May i use react^16.8.0 ? image

JulioMARIE commented 2 years ago

I solve like this -> npm i @brainhubeu/react-carousel -legacy-peer-deps image

sugheiry-alcala commented 2 years ago

Resuelvo así -> npm i @brainhubeu/react-carousel -legacy-peer-deps imagen

Muchas GRACIAS !!!! PROBLEMA SOLICUIONADO

lucaseduardosilva commented 1 year ago

I solve like this -> npm i @brainhubeu/react-carousel -legacy-peer-deps image

THANK YOU VERY MUCH!!!!!!!!