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

theme.applyStyles is not a function #43857

Closed
15010133689 opened this issue Sep 22, 2024 · 3 comments
Closed

theme.applyStyles is not a function #43857

15010133689 opened this issue Sep 22, 2024 · 3 comments
Labels
package: system Specific to @mui/system

Comments

@15010133689
Copy link

15010133689 commented Sep 22, 2024

Steps to reproduce

Link to live example: (required)

Steps:
1.I'm upgrading MUI from v5 to v6.1.1
2.Write a test page,for the example:AppBar position="static">test </AppBar

3.there is an error about AppBar element
theme.applyStyles is not a function

Current behavior

Internal error: TypeError: theme.applyStyles is not a function
at eval (./node_modules/@mui/material/AppBar/AppBar.js:136:30)
at eval (./node_modules/@mui/material/utils/memoTheme.js:20:21)
at processStyle (./node_modules/@mui/system/createStyled/createStyled.js:49:55)
at eval (./node_modules/@mui/system/createStyled/createStyled.js:162:25)
at handleInterpolation (./node_modules/@emotion/serialize/dist/emotion-serialize.development.esm.js:154:24)
at serializeStyles (./node_modules/@emotion/serialize/dist/emotion-serialize.development.esm.js:285:15)
at eval (./node_modules/@emotion/styled/base/dist/emotion-styled-base.development.esm.js:227:91)
at eval (./node_modules/@emotion/react/dist/emotion-element-ba80abe0.develop

Expected behavior

Display the test page normally

Context

No response

Your environment

"@mui/icons-material": "6.1.1",
"@mui/material": "6.1.1",
"@mui/material-nextjs": "6.1.1",
"@mui/material-pigment-css": "6.1.1",
"@material-ui/core": "^5.0.0-beta.5",
"@material-ui/icons": "^4.11.3",
Search keywords: theme.applyStyles is not a function

@15010133689 15010133689 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Sep 22, 2024
@github-actions github-actions bot removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Sep 23, 2024
Copy link

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

Note

We value your feedback @15010133689! How was your experience with our support team?
We'd love to hear your thoughts in this brief Support Satisfaction survey. Your insights help us improve!

@zannager zannager added the package: system Specific to @mui/system label Sep 23, 2024
@andreycmartins
Copy link

How did you solve it?

@15010133689
Copy link
Author

"@material-ui/core": "^5.0.0-beta.5",Delete this reference. What I originally used in my code was import {createTheme, ThemeProvider} from "@material-ui/core";change this to import {createTheme, ThemeProvider} from "@mui/material";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: system Specific to @mui/system
Projects
None yet
Development

No branches or pull requests

3 participants