yaodingyd / react-flickity-component

A React.js component for using @desandro's Flickity
314 stars 51 forks source link

npm ERR! Could not resolve dependency: npm ERR! peer react@"^16.14.0" from react-flickity-component@3.6.1 #124

Closed BaseMax closed 3 years ago

BaseMax commented 3 years ago

[max@workstation Web]$ npm install

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: shahro@0.1.0
npm ERR! Found: react@17.0.2
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.14.0" from react-flickity-component@3.6.1
npm ERR! node_modules/react-flickity-component
npm ERR!   react-flickity-component@"^3.6.1" 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/max/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/max/.npm/_logs/2021-05-21T10_06_34_630Z-debug.log
BaseMax commented 3 years ago

Hi again;

No any solution and plan to solve or help me how can solve this?

Thanks in advance.

[max@workstation Projects]$ cd Web/
[max@workstation Web]$ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: shahro@0.1.0
npm ERR! Found: react@17.0.2
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.14.0" from react-flickity-component@3.6.1
npm ERR! node_modules/react-flickity-component
npm ERR!   react-flickity-component@"^3.6.1" 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/max/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/max/.npm/_logs/2021-05-28T12_08_01_991Z-debug.log
anhtran commented 3 years ago

Currently, the only way is adding flag --force. We must wait for the author updates the peerDependencies.

theolampert commented 3 years ago

@anhtran @BaseMax Could one of you open a pull request for this please?

Antonio-Laguna commented 3 years ago

@yaodingyd and @theolampert this needs to be released for this to be actually fixed

theolampert commented 3 years ago

Thanks @Antonio-Laguna and for your contribution too, @yaodingyd is taking over the project so I'll let him do an npm release, can you verify it works if you point to the repo in your package.json?

Antonio-Laguna commented 3 years ago

Thanks @theolampert

It does work like that, I can confirm. Just retried:

Bunch of warnings after replacing but has nothing to do with this.

yaodingyd commented 3 years ago

3.6.2 is out