i got this error and im not quite sure what is the compatibility issue is,
Problem:
Compiled with problems:
×
ERROR in ./src/App.jsx 6:0-50
Module not found: Error: Can’t resolve ‘@material/-ui/icons’ in ‘C:UsersyasriOneDriveDesktopSTUDY PROJECTreactprojsrc’
package.json:
{
"name": "reactproj",
"version": "0.1.0",
"private": true,
"dependencies": {
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.14.18",
"@mui/material": "^5.14.18",
"@testing-library/jest-dom": "^6.1.4",
"@testing-library/react": "^14.1.2",
"@testing-library/user-event": "^14.5.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "^5.0.1",
"web-vitals": "^3.5.0"
},
3
Answers
Looks like a typo in your import statement. Try these:
Where
SomeIcon
is the icon your trying to import.You can see the exact import statement for each MUI icon here
Try performing the following operation
The link to the exact package : https://www.npmjs.com/package/@material-ui/icons
This is what is missing. So either try to check if you are importing the correct package, else the above package installation should help.
The import statement you provided contains an extra ‘/‘ in the module name.
It should be ‘@material-ui/icons‘ instead of ‘@material/-ui/icons‘.
Consider correcting the import statement.