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

161
Visualizações
Facing error while using materisl-ui icons in react app

I have used the commands npm install @material-ui/core and npm install @material-ui/icons in my react app and want to use the FileUploadIcon. I am importing it by using

import { FileUploadIcon } from '@material-ui/icons/FileUpload';

and later

<input type= "file" id = "file" onChange={checkJSON}/>
<label for = "file">
<FileUploadIcon />
    Choose a JSON file
</label>'

I am getting the error

Module not found: Can't resolve '@material-ui/icons/FileUpload' in 'F:\Profile\Desktop\New\UI\react-jwt-auth-master\src\components'

My package.json has these dependencies

"@material-ui/core": "^4.12.4",
"@material-ui/icons": "^4.11.3",
about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

icon import code needs to be changed

change this code

import { FileUploadIcon } from '@material-ui/icons/FileUpload';

like this

import { FileUploadIcon } from '@material-ui/icons';

a solution to this question will help us

How do I upload Icons from material-ui?

about 4 years ago · Juan Pablo Isaza Relatório

0

You can use the search here to see which icons are part of @material-ui/icons: https://material-ui.com/components/material-icons/. FileUploadIcon is not there.

If you have the svg for an icon such as from the material.io site, you can create an SvgIcon element by grabbing the path element from the svg:

Please refer this link: Module not found: Can't resolve '@material-ui/icons/ContentCut'

about 4 years ago · Juan Pablo Isaza 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