Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

159
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!