brainhubeu / react-carousel

A pure extendable React carousel, powered by Brainhub (craftsmen who ❤️ JS)

Home Page:https://brainhub.eu/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

astriskit opened this issue · comments

commented

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

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.`

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

The same

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

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

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

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

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

Muchas GRACIAS !!!! PROBLEMA SOLICUIONADO

commented

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

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