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

[docs][joy] Error in the exemplary Codesandbox of using Material UI and Joy UI together #36451

Closed
2 tasks done
egazarian opened this issue Mar 7, 2023 · 9 comments · Fixed by #36462
Closed
2 tasks done
Assignees
Labels
bug 🐛 Something doesn't work docs Improvements or additions to the documentation package: joy-ui Specific to @mui/joy

Comments

@egazarian
Copy link

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Steps to reproduce 🕹

Link to live example: https://codesandbox.io/s/material-ui-feat-joy-ui-vvvv59?file=/demo.tsx
This is the official code sandbox of the guide Joy UI and Material UI together (Case A: Joy UI in a Material UI project).

Steps:

  1. Run the app.

Current behavior 😯

The app throws this kind of error: "Cannot read properties of undefined (reading '[property]')".
[property] can be "xl", "sm" etc...

Expected behavior 🤔

The app should starts without any error.

Context 🔦

I'am using Joy UI in a Material UI project. Everything was working fine before the version 5.11.12 of Material UI and 5.0.0-alpha.70 of Joy UI.

Your environment 🌎

npx @mui/envinfo
Tested on Chrome 110.0.5481.177

  System:
    OS: macOS 13.1
  Binaries:
    Node: 16.17.1 - ~/.nvm/versions/node/v16.17.1/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 8.15.0 - ~/.nvm/versions/node/v16.17.1/bin/npm
  Browsers:
    Chrome: 110.0.5481.177
    Edge: Not Found
    Firefox: 110.0.1
    Safari: 16.2
  npmPackages:
    @emotion/react: 11.10.6 => 11.10.6 
    @emotion/styled: 11.10.6 => 11.10.6 
    @mui/base:  5.0.0-alpha.120 
    @mui/core-downloads-tracker:  5.11.12 
    @mui/icons-material: ^5.11.9 => 5.11.11 
    @mui/joy: ^5.0.0-alpha.68 => 5.0.0-alpha.70 
    @mui/material: ^5.11.10 => 5.11.12 
    @mui/private-theming:  5.11.12 
    @mui/styled-engine:  5.11.11 
    @mui/system:  5.11.12 
    @mui/types:  7.2.3 
    @mui/utils:  5.11.12 
    @mui/x-data-grid:  5.17.26 
    @mui/x-data-grid-pro: ^5.17.16 => 5.17.26 
    @mui/x-date-pickers:  5.0.0 
    @mui/x-date-pickers-pro:  5.0.0 
    @mui/x-license-pro:  5.17.12 
    @types/react: ^18.0.0 => 18.0.28 
    react: ^18.0.2 => 18.2.0 
    react-dom: ^18.0.2 => 18.2.0 
    typescript: ^4.1.2 => 4.9.5 
@egazarian egazarian added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Mar 7, 2023
@zannager zannager added the package: joy-ui Specific to @mui/joy label Mar 7, 2023
@hbjORbj
Copy link
Member

hbjORbj commented Mar 7, 2023

The app throws this kind of error: "Cannot read properties of undefined (reading '[property]')".

I cannot reproduce this issue. Can you please take a screen recording?

@hbjORbj hbjORbj added status: waiting for author Issue with insufficient information docs Improvements or additions to the documentation and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Mar 7, 2023
@hbjORbj hbjORbj assigned hbjORbj and unassigned siriwatknp Mar 7, 2023
@hbjORbj hbjORbj changed the title Cannot read properties of undefined (reading '[property]') [docs][Joy] Cannot read properties of undefined (reading '[property]') Mar 7, 2023
@hbjORbj hbjORbj changed the title [docs][Joy] Cannot read properties of undefined (reading '[property]') [docs][Joy] Cannot read properties of undefined (reading '[property]') type error Mar 7, 2023
@egazarian
Copy link
Author

Yes, sure.

Enregistrement.de.l.ecran.2023-03-07.a.15.05.24.mov

@github-actions github-actions bot removed the status: waiting for author Issue with insufficient information label Mar 7, 2023
@egazarian
Copy link
Author

egazarian commented Mar 7, 2023

I tested on firefox 110.0.1 and the app throws another error: "TypeError: theme.vars.fontSize is undefined"

@egazarian
Copy link
Author

Maybe it's related to this #36282 (comment)

@hbjORbj
Copy link
Member

hbjORbj commented Mar 7, 2023

#36282 was released in 5.0.0-alpha.70, and the issue you reported still happens with lower versions, so I think this is a different issue.

@egazarian
Copy link
Author

egazarian commented Mar 7, 2023

Ok, that makes sense.

@hbjORbj hbjORbj changed the title [docs][Joy] Cannot read properties of undefined (reading '[property]') type error [docs][joy] Error in Guide Codesandbox Mar 7, 2023
@hbjORbj hbjORbj changed the title [docs][joy] Error in Guide Codesandbox [docs][joy] Error in exemplary Codesandbox on using Material UI and Joy UI together Mar 7, 2023
@hbjORbj hbjORbj changed the title [docs][joy] Error in exemplary Codesandbox on using Material UI and Joy UI together [docs][joy] Error in the exemplary Codesandbox of using Material UI and Joy UI together Mar 7, 2023
@hbjORbj
Copy link
Member

hbjORbj commented Mar 7, 2023

It is a bug indeed.

Here are working Codesandboxes: (1) https://codesandbox.io/s/material-ui-feat-joy-ui-1jkvm9?file=/demo.tsx and (2) https://codesandbox.io/s/joy-ui-feat-material-ui-zhcprk?file=/demo.tsx

I will create a PR soon. Thanks again for the report.

@egazarian
Copy link
Author

Thanks for the fix 🙇

@tombombadilom
Copy link

So quick ! Everything alright now, you are great !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work docs Improvements or additions to the documentation package: joy-ui Specific to @mui/joy
Projects
None yet
5 participants