davidhu2000 / react-spinners

A collection of loading spinner components for react
https://www.davidhu.io/react-spinners
MIT License
3.05k stars 264 forks source link

react-spinners@0.9.0 incompatible with react@17.0.1 #321

Closed EbenBosman closed 3 years ago

EbenBosman commented 3 years ago

I am attempting to update the dependencies of the project I am working on. However it seems that react-spinners@0.9.0 (Latest version as of writing) is incompatable with react@17.0.1. Please the output of npm install below:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: xxxxxx@0.0.1
npm ERR! Found: react@17.0.1
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.0.0" from react-spinners@0.9.0
npm ERR! node_modules/react-spinners
npm ERR!   react-spinners@"^0.9.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.
mlippert commented 3 years ago

Interesting. I see:

npm WARN react-spinners@0.9.0 requires a peer of react@^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-spinners@0.9.0 requires a peer of react-dom@^16.0.0 but none is installed. You must install peer dependencies yourself.

But everything still works. I'm running npm version 6.14.10 and node version v12.20.0 in case that may matter.

Since everything still works w/ react and react-dom v17 it'd be nice if the react-spinners peer dependency version was updated to reflect that (unless there are problems I just haven't encountered).

[edit] Also to be fair, I've got very limited use of react-spinners, just the ScaleLoader, so not the best test of the package functionality!

davidhu2000 commented 3 years ago

should be a fairly easy fix. https://github.com/davidhu2000/react-spinners/blob/master/package.json#L92-L93

need to add v17 into peer dependencies

davidhu2000 commented 3 years ago

@EbenBosman can you install react-spinners@0.10.0-alpha.3 and see if this issue is resolved?

T0X1CCAT commented 3 years ago

@EbenBosman can you install react-spinners@0.10.0-alpha.3 and see if this issue is resolved?

i believe the issue is fixed