I have created my react js application using vite. and i am using npm. I installed material ui and my package.json file has these packages:
"dependencies": {
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"@mui/material": "^5.11.15",
"@mui/styled-engine-sc": "^5.11.11",
"@mui/x-data-grid": "^6.0.3",
when i run this application, the application does not work and give me this error in console:
when i click on the "chunk" file, this is the problematic line
That comes in the export list here:
(https://i.stack.imgur.com/2WnC0.png).
What can i do about it?
I tried reinstalling @emotion/styled and @emotion/react but that didn’t work.
2
Answers
One missing dependency was: "@material-ui/core": "^4.12.4" I installed @material-ui/core, and it worked
remove IMPORT react3 from the component or reinstall react dependency