You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use the Material ui snackbar and alerts but the browser is showing an error:
withStyles.js?1e4f:3 Uncaught Error: Material-UI: withStyles is not longer exported from @material-ui/core/styles.
You have to import it from @material-ui/styles.
Alert.js is doing this:
import { withStyles, lighten, darken } from '@material-ui/core/styles';
[x ] The issue is present in the latest release.
[x ] I have searched the issues of this repository and believe that this is not a duplicate.
Current Behavior 😯
Application compiles without issue, but shows error in browser.
Don't forget to mention which browser you used.
Output from `npx @mui/envinfo` goes here.
Manually changing the line in node_modules\@material-ui\lab\esm\Alert\Alert.js to import { withStyles, lighten, darken } from '@material-ui/styles'; fixes the issue, but that's obviously not the wanted solution.
The text was updated successfully, but these errors were encountered:
@eps1lon You're right, I was using "@material-ui/lab": "^4.0.0-alpha.60", which is installed when yarn add @material-ui/lab I can't find any references to a new version of @material-ui/lab@material-ui/lab@next in any of the documents though.
I'm trying to use the Material ui snackbar and alerts but the browser is showing an error:
Alert.js is doing this:
Current Behavior 😯
Application compiles without issue, but shows error in browser.
Expected Behavior 🤔
Shouldn't show an error.
Steps to Reproduce 🕹
https://codesandbox.io/s/gifted-forest-ztng7
Your Environment 🌎
`System: OS: Windows 10 10.0.19042 Binaries: Node: 14.17.6 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.11 - ~\AppData\Roaming\npm\yarn.CMD npm: 6.14.15 - C:\Program Files\nodejs\npm.CMD Browsers: Chrome: Not Found Edge: Spartan (44.19041.1023.0), Chromium (93.0.961.38) npmPackages: @emotion/react: ^11.4.1 => 11.4.1 @emotion/styled: ^11.3.0 => 11.3.0 @mui/core: 5.0.0-alpha.46 @mui/material: ^5.0.0-rc.1 => 5.0.0-rc.1 @mui/private-theming: 5.0.0-rc.1 @mui/styled-engine: 5.0.0-rc.1 @mui/system: 5.0.0-rc.1 @mui/types: 7.0.0-rc.1 @mui/utils: 5.0.0-rc.1 @types/react: ^17.0.20 => 17.0.20 react: ^17.0.2 => 17.0.2 react-dom: ^17.0.2 => 17.0.2 typescript: ^4.3.5 => 4.3.5`
Manually changing the line in
node_modules\@material-ui\lab\esm\Alert\Alert.js
toimport { withStyles, lighten, darken } from '@material-ui/styles';
fixes the issue, but that's obviously not the wanted solution.The text was updated successfully, but these errors were encountered: