question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed prop type: "deprecatedVariants" is read-only

See original GitHub issue

const theme = createMuiTheme({ typography: { useNextVariants: true, }, });

in both my client.js and server.js , but still whenever I open my console, I receive this error:

index.js:1 Warning: Failed prop type: “deprecatedVariants” is read-only in Typography (created by WithStyles(Typography)) in WithStyles(Typography) (at Layout.js:111) in div (created by Toolbar) in Toolbar (created by WithStyles(Toolbar)) in WithStyles(Toolbar) (at Layout.js:99) in header (created by Paper) in Paper (created by WithStyles(Paper)) in WithStyles(Paper) (created by AppBar) in AppBar (created by WithStyles(AppBar)) in WithStyles(AppBar) (at Layout.js:92) in div (at Layout.js:86) in Layout (created by WithStyles(Layout)) in WithStyles(Layout) (created by WithStyles(WithStyles(Layout))) in WithStyles(WithStyles(Layout)) (created by Connect(WithStyles(WithStyles(Layout)))) in Connect(WithStyles(WithStyles(Layout))) (at home/index.js:19) in MuiThemeProvider (at client.js:101) in App (at client.js:100)

Any suggestions to solve this issue?

Note : My WithStyles is @material-ui/core/styles && withStyle is isomorphic-style-loader/lib/withStyles

_Originally posted by @Arrow891 in https://github.com/mui-org/material-ui/issues/12741#issuecomment-430518133_

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
pushpanjalipcommented, Oct 17, 2018

@eps1lon Already done, but the error still persists

I have solved the issue by upgradiing to @material-ui/core@^3.2.2 and adding typography: { useNextVariants: true }, while creating Theme.

1reaction
eps1loncommented, Oct 17, 2018

@Arrow891 Please remove your node_modules, install again and post (depending on your package manager) yarn list --pattern @material-ui/core or npm ls @material-ui/core

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed prop type: "deprecatedVariants" is read-only in ... - GitHub
Just updated to v3.2.1 and am getting the following error in console: Failed prop type: "deprecatedVariants" is read-only in Typography ...
Read more >
Failed prop type: The prop `justify` of `ForwardRef(Grid)` is ...
Note that The prop justify is deprecated, use justifyContent instead. So, replace justify by justifyContent. Before :
Read more >
deprecated-react-native-prop-types | Yarn - Package Manager
This package contains deprecated prop-types from React Native. Image.propTypes. Before. import {Image} from 'react-native'; doSomething(Image ...
Read more >
material-ui/core/CHANGELOG.md - UNPKG
- Start to add deprecations in anticipation of v5. We plan to add a deprecation for any breaking change in v5 that allows...
Read more >
Deprecated - CKEditor 4 Documentation
Learn how to install, integrate and configure CKEditor 4. More complex aspects, like creating plugins, widgets and skins are explained here, too.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found