Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't resolve '@material-ui/icons/Clear in mui-datatables/dist #1791

Closed
TheLogan opened this issue Oct 10, 2021 · 8 comments
Closed

Can't resolve '@material-ui/icons/Clear in mui-datatables/dist #1791

TheLogan opened this issue Oct 10, 2021 · 8 comments

Comments

@TheLogan
Copy link

Expected Behavior

This happens when running yarn start

Current Behavior

My project attempts to run but crashes at some point during startup with above-mentioned error
I can see that MUI-Datatables expects to fetch icons from @material-ui/icons/ however the version of Material UI that I've added has them in @mui/icons-material/, as a test I went through /node_modules/mui-datatables/dist/index.js and replaced all paths for mui icons with the actual path, and now it runs as expected, my guess would be that MUI icons at some point changed their install path and that then breaks mui-datatables.

Steps to Reproduce (for bugs)

  1. create react app
  2. add Material UI
  3. add mui icons,
  4. add mui-datatables,
  5. run start

Your Environment

Tech Version
Material-UI ^5.0.3
MUI Icons ^5.0.3
MUI-datatables ^3.7.8
React ^17.0.2
@CLu1s
Copy link

CLu1s commented Oct 12, 2021

you need to wait for this PR #1772

@kvlknctk
Copy link

C'mon!

@wdh2100
Copy link
Collaborator

wdh2100 commented Oct 26, 2021

Release 4.0.0

@the-noob
Copy link

the-noob commented Nov 1, 2021

Just upgraded to 4.0 but still getting this

....node_modules/mui-datatables/dist/index.js
Module not found: Can't resolve '@mui/icons-material/Clear' in '/home/...../node_modules/mui-datatables/dist'

@saurabhjindal-SF
Copy link

@the-noob run yarn add @mui/icons-material

@the-noob
Copy link

why should I add dependencies that I don't use ?

@ashfaqnisar
Copy link
Contributor

@TheLogan the #1772 is merged, this should fix the issue. So, Can you close this issue ?

@TheLogan
Copy link
Author

TheLogan commented Dec 7, 2021

Thank you :)

@TheLogan TheLogan closed this as completed Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants