163
rated 0 times
[
164]
[
1]
/ answers: 1 / hits: 40564
/ 3 Years ago, tue, september 21, 2021, 12:00:00
I am trying to import a box component from @mui/material/Box
. I have installed MUI 5 using the following command npm i @mui/material
.
But this error is occurring, Module not found: Can't resolve '@emotion/react' in 'E:frontendnode_modules@muistyled-engine'
Here is my code.
import * as React from 'react';
import Box from '@mui/material/Box';
export default function WhiteSpace() {
return (
<div style={{ width: 200 }}>
<Box
component="div"
sx={{
whiteSpace: 'nowrap',
my: 2,
bgcolor: 'background.paper',
}}
>
White Space Nowrap. White Space Nowrap.
</Box>
<Box
component="div"
sx={{
whiteSpace: 'normal',
my: 2,
bgcolor: 'background.paper',
}}
>
White Space Normal. White Space Normal.
</Box>
</div>
);
}
Can someone help me fix this?
More From » reactjs