Upgrading from 5.0.0-alpha.4 to 5.0.0-alpha.5 breaks compilation with the following
Failed to compile.
./node_modules/@material-ui/core/esm/Button/Button.js
Attempted import error: 'useThemeVariants' is not exported from '@material-ui/styles'.
Using an un-ejected create-react-app 3.4.1 project with --typescript template
| Tech | Version |
| ----------- | ------- |
| Material-UI | v5.0.0-alpha.5 |
| React | 16.13.1 |
| Browser | Chrome 84.0.4147.89 (Official Build) (64-bit) |
| TypeScript | 3.8.2 |
| etc. | |
tsconfig
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react"
},
"include": [
"src"
]
}
I found same question under 5.0.0-alpha.5
same here using on nextjs
I have released a new version of @material-ui/styles to solve the issue for new installations: https://codesandbox.io/s/98luw?file=/demo.js. For existing ones, you will need to clear the package manager lock file. Or wait for v5.0.0-alpha.6.
Most helpful comment
I have released a new version of
@material-ui/stylesto solve the issue for new installations: https://codesandbox.io/s/98luw?file=/demo.js. For existing ones, you will need to clear the package manager lock file. Or wait for v5.0.0-alpha.6.