SandDance icon indicating copy to clipboard operation
SandDance copied to clipboard

[bug] react version dependencies locked at 16.x

Open amcdnl opened this issue 3 years ago • 9 comments

Issue

When trying to install sanddance-react I get the following error:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @types/[email protected]
npm ERR! node_modules/@types/react
npm ERR!   dev @types/react@"^17.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @types/react@"^16.9.34" from @msrvida/[email protected]
npm ERR! node_modules/@msrvida/sanddance-react
npm ERR!   @msrvida/sanddance-react@"3.0.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!

My dependencies are set to:

    "@types/react": "^17.0.2",
    "@types/react-dom": "^17.0.2",
    "react-dom": "^17.0.2",
    "react": "^17.0.2",

I believe the package should loosen these dependencies given that 17.x has no breaking changes for this project.

amcdnl avatar Jan 13 '22 14:01 amcdnl

Hi @amcdnl , first off, just making sure you have at least npm 7 for the peer dependency part. Yes we ought to be able to support React@17, as long as @types\react is compatible.

danmarshall avatar Jan 13 '22 21:01 danmarshall

me@mbp  ~  npm --version
8.1.0

amcdnl avatar Jan 13 '22 22:01 amcdnl

Hi Austin, as we rely on @fluentui/react version 7, we are in lockstep with their peer deps. See https://github.com/microsoft/fluentui/issues/20145

Their version 8 however, specifies compat with React 17.

Which means to support this at this time, we'd need to major-version-bump our packages:

  • @msrvida/sanddance-explorer
  • @msrvida/sanddance-embed

Which means supporting current v3 and next v4 of each of these packages.

It may be easier for you to republish under your own org on npm (swap out @msrvida with your org name) if you're open to that.

danmarshall avatar Jan 14 '22 02:01 danmarshall

My current plan is to major bump all packages in this repo to v4 (in a future major release) and at that time, set React 17 as the minimum.

danmarshall avatar Jan 14 '22 02:01 danmarshall

@danmarshall - Thanks for the update. Is there a timeframe for that set yet?

amcdnl avatar Jan 20 '22 14:01 amcdnl

@amcdnl Nothing in stone, but shooting for mid-year.

danmarshall avatar Jan 20 '22 21:01 danmarshall

Thanks @danmarshall - 18 will be out by then :D

amcdnl avatar Jan 21 '22 13:01 amcdnl

Hi @amcdnl , we've got a beta of our next major version 4 which uses react@17. I know that 18 is now out, but @fluentui/react is >=16.8.0 <18.0.0. When they go to 18 we can do a minor version bump.

danmarshall avatar Jul 19 '22 00:07 danmarshall

Thanks for the update! We've moved to 18 already but happy to have it closer.

amcdnl avatar Jul 19 '22 11:07 amcdnl