Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

1.4K
Visualizações
Attempted import error: 'alpha' is not exported from '@material-ui/core/styles'

I'm trying to use the material-ui/lab date picker, however I'm getting this error! I have updated my material-ui version using npm install @material-ui/core@latest and it worked fine. However, I lost the ability to use createMuiTheme & MuiThemeProvider.

over 4 years ago · Santiago Trujillo
9 Respostas
Responde à pergunta

0

My material-ui version when first downloaded was an earlier version. Then i ran:

npm i -g npm-check-updates
ncu -u
npm install

to let it upgrade automatically to latest version.

over 4 years ago · Santiago Trujillo Relatório

0

I had to downgrade npm node@11.15.0 and npm install @material-ui/core@4.12.1 then it fixed all issues. Please check node version with your node.

over 4 years ago · Santiago Trujillo Relatório

0

You should update your package.json with following:

"@material-ui/lab": "4.0.0-alpha.57",
"@material-ui/pickers": "3.2.10",
over 4 years ago · Santiago Trujillo Relatório

0

I had the same problem with Skeleton using version @material-ui/lab": "4.0.0-alpha.60 but changing it to version @material-ui/lab": "4.0.0-alpha.57 fixed it for me ... guess they broke it again :)

over 4 years ago · Santiago Trujillo Relatório

0

Please try updating to latest version of @material-ui/core. That should fix the issue.

over 4 years ago · Santiago Trujillo Relatório

0

i can't solve this problem with above solutions.
so manually change 'alpha' to 'fade' in material ui files

./node_modules/@material_ui/lab/esm/

for example :

import { fade, withStyles, useTheme } from '@material-ui/core/styles';

instead

import { alpha, withStyles, useTheme } from '@material-ui/core/styles';

it's works for me
but it's not correct solutions.

over 4 years ago · Santiago Trujillo Relatório

0

update npm @material-ui/core package npm update resolved my issue

over 4 years ago · Santiago Trujillo Relatório

0

Maybe it'll be helpful for someone. For me fix of that issue was to change the indirect import to direct one:

so this triggered the error:

import { Alert } from '@material-ui/lab';

this works fine:

import Alert from '@material-ui/lab/Alert';
over 4 years ago · Santiago Trujillo Relatório

0

I was using MUI v4 and was trying to use the Appbar from MUI, updating my MUI by running the command npm install @material-ui/core@latest and restarting the server by using npm start worked for Me, Hope this helps!!

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda