siriwatknp / mui-treasury

A collection of ready-to-use components based on Material-UI
https://mui-treasury.com
MIT License
2.37k stars 153 forks source link

Getting examples working with newer MUI v5 or v6? #1215

Closed gregfenton closed 8 months ago

gregfenton commented 1 year ago

Are there any decent guides (or working examples/sandboxes) of getting some of the MUI-Treasury code working with newer versions of @MUI ?

For example, I'd like to get https://mui-treasury.com/styles/tabs/#Apple running with MUI v^5.11.0. I just am not clear as to all the changes required especially around the move away from the deprecated createStyles(), and trying to install @mui-treasury/styles fails with dependency issues:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: my_app@1.0.0
npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR!   react@"18.2.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.0 || ^17.0.0" from @material-ui/core@4.12.4
npm ERR! node_modules/@material-ui/core
npm ERR!   peer @material-ui/core@"4.x" from @mui-treasury/styles@1.13.1
npm ERR!   node_modules/@mui-treasury/styles
npm ERR!     @mui-treasury/styles@"*" from the root project

Things get really deep if --force is used . . .

danny-faith commented 10 months ago

I'm in the same position as you Greg and getting an identical error, I have React 18 and MUI v5. Did you find a solution?

Thank you.

gregfenton commented 10 months ago

I'm in the same position as you Greg and getting an identical error, I have React 18 and MUI v5. Did you find a solution?

Nope. I unfortunately timeboxed my experimentation and ended up moving on. I'd still love to see the treasures on a recent release of MUI!

Setloth commented 9 months ago

unfortunately stuck with the same- mui latest releases seem to break with the treasury concepts. quite sad

siriwatknp commented 8 months ago

The new mui-treasury is now working with Material UI v5 🎉. I am migrating the rest, please check #1220 for the progress.