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

229
Views
Module not found: Can't resolve '@emotion/react' in 'E:\frontend\node_modules\@mui\styled-engine'

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:\frontend\node_modules\@mui\styled-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?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

@emotion/react and @emotion/styled are peer dependencies of many mui packages, ie @mui/material. This gives us more freedom over which emotion version we would like to use, but does mean we must install the dependencies ourselves.

npm i @emotion/react @emotion/styled
over 4 years ago · Santiago Trujillo 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!