Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] react version dependencies locked at 16.x #393

Closed
amcdnl opened this issue Jan 13, 2022 · 9 comments
Closed

[bug] react version dependencies locked at 16.x #393

amcdnl opened this issue Jan 13, 2022 · 9 comments

Comments

@amcdnl
Copy link

amcdnl commented Jan 13, 2022

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.

@danmarshall
Copy link
Contributor

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.

@amcdnl
Copy link
Author

amcdnl commented Jan 13, 2022

me@mbp  ~  npm --version
8.1.0

@danmarshall
Copy link
Contributor

danmarshall commented Jan 14, 2022

Hi Austin, as we rely on @fluentui/react version 7, we are in lockstep with their peer deps. See microsoft/fluentui#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
Copy link
Contributor

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.

@amcdnl
Copy link
Author

amcdnl commented Jan 20, 2022

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

@danmarshall
Copy link
Contributor

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

@amcdnl
Copy link
Author

amcdnl commented Jan 21, 2022

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

@danmarshall
Copy link
Contributor

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.

@amcdnl
Copy link
Author

amcdnl commented Jul 19, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants