TimboKZ / Chonky

😸 A File Browser component for React.
https://chonky.io
MIT License
749 stars 165 forks source link

Upgrade material ui dependency to v5. #189

Open LeifAndersen opened 1 year ago

LeifAndersen commented 1 year ago

Right now this library uses material ui v4. It looks like that its no longer being maintained since v5 has come out:

https://www.npmjs.com/package/@material-ui/core

Unfortunately, it also looks like v4 relies on react 17, and fails on react 18. As such, chonky also seems to require react 17.

SkippyHub commented 1 year ago

bump

 WARN  Issues with peer dependencies found
.
└─┬ chonky 2.3.2
  β”œβ”€β”¬ @material-ui/core 4.11.3
  β”‚ β”œβ”€β”€ βœ• unmet peer react@"^16.8.0 || ^17.0.0": found 18.2.0
  β”‚ β”œβ”€β”€ βœ• unmet peer react-dom@"^16.8.0 || ^17.0.0": found 18.2.0
  β”‚ β”œβ”€β”¬ @material-ui/styles 4.11.5
  β”‚ β”‚ β”œβ”€β”€ βœ• unmet peer react@"^16.8.0 || ^17.0.0": found 18.2.0
  β”‚ β”‚ β”œβ”€β”€ βœ• unmet peer react-dom@"^16.8.0 || ^17.0.0": found 18.2.0
  β”‚ β”‚ └─┬ @material-ui/utils 4.11.3
  β”‚ β”‚   β”œβ”€β”€ βœ• unmet peer react@"^16.8.0 || ^17.0.0": found 18.2.0
  β”‚ β”‚   └── βœ• unmet peer react-dom@"^16.8.0 || ^17.0.0": found 18.2.0
  β”‚ └─┬ @material-ui/system 4.12.2
  β”‚   β”œβ”€β”€ βœ• unmet peer react@"^16.8.0 || ^17.0.0": found 18.2.0
  β”‚   └── βœ• unmet peer react-dom@"^16.8.0 || ^17.0.0": found 18.2.0
  └─┬ react-intl 5.25.1
    β”œβ”€β”€ βœ• unmet peer typescript@^4.5: found 5.0.4
    └─┬ @formatjs/intl 2.2.1
      └── βœ• unmet peer typescript@^4.5: found 5.0.4
michaelpward commented 1 year ago

Chonky will die a quick death if key dependencies are not kept up to date. πŸ‘πŸΌ

LeifAndersen commented 1 year ago

Since it looks like this project hasn't had any updates in over a year, I suspect it may already be too late. :(

FWIW, as a temporary (pretty awful) patch, you 'might' be able to get around this by putting this in your package.json:

  "overrides": {
    "react": "$react"
  }
dominique-mueller commented 1 year ago

@TimboKZ Would you accept a PR on this?

divyam234 commented 1 year ago

@dominique-mueller @LeifAndersen Try this updated version https://github.com/aperturerobotics/react-chonky. I have also done the whole migration in emotion and muiv5 and some general tweaks like Material 3, virtuoso for better performance on virtual lists and also removed dependency on icon packages (both in one) you can check my fork also here https://github.com/divyam234/react-chonky