reactjs / react-transition-group

An easy way to perform animations when a React component enters or leaves the DOM
https://reactcommunity.org/react-transition-group/
Other
10.1k stars 652 forks source link

Error when running npm install #834

Open mkelley33 opened 2 years ago

mkelley33 commented 2 years ago

What is the current behavior?


npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: react-transition-group@4.4.2
npm ERR! Found: react@18.0.0
npm ERR! node_modules/react
npm ERR!   dev react@"^18.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.0" from @restart/hooks@0.3.22
npm ERR! node_modules/@restart/hooks
npm ERR!   dev @restart/hooks@"^0.3.22" 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 resoluti```

> What is the expected behavior?

That it cleanly installs

> Could you provide a [CodeSandbox](https://codesandbox.io/) demo reproducing the bug?

No, it happens at install time
koba04 commented 1 year ago

This seems to be caused by the @restart/hooks package, not react-transition-group. I think you should update @restart/hooks to v0.3.26 or later versions. https://github.com/react-restart/hooks/blob/master/CHANGELOG.md#0326-2021-01-05

mkelley33 commented 1 year ago

So I updated to v0.3.26 of @restart/hooks, but it still choked on storybook/react@6.3.4 so I ran npm install --legacy-peer-deps and that seemed to allow it to install just fine. Then I was able to run npm run storybook. @koba04 Should I put in a PR to capture all of this?