close

[Solved] Module not found: Can’t resolve ‘@material-ui/core/Container’

Hello Guys, How are you all? Hope You all Are Fine. Today When I am run my reactjs project it gives me the following error Module not found: Can’t resolve ‘@material-ui/core/Container’ in reactjs. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Module not found: Can’t resolve ‘@material-ui/core/Container’ Error Occurs ?

When I am run my reactjs project it gives me the following error.

Failed to compile Module not found: Can't resolve '@material-ui/core/Container'

How To Solve Module not found: Can’t resolve ‘@material-ui/core/Container’ Error ?

  1. How To Solve Module not found: Can't resolve '@material-ui/core/Container' Error?

    To Solve Module not found: Can't resolve '@material-ui/core/Container' error Actually Container is not part of the material-ui version specified in your package.json. To upgrade, run the following:

  2. Module not found: Can't resolve '@material-ui/core/Container'

    To Solve Module not found: Can't resolve '@material-ui/core/Container' error Actually Container is not part of the material-ui version specified in your package.json. To upgrade, run the following:

Solution 1

Actually Container is not part of the material-ui version specified in your package.json. To upgrade, run the following:

$ yarn add @material-ui/[email protected]

You might have to remove the old stable version. React and react-dom >= 16.8.0 are all that is needed as peer dependencies, so the experimental upgrade  material-ui should be all you need to use Container.

Solution 2

Here If you follow a npx create-react-app new-app with cd new-app and yarn add @material-ui/core it wile compile with yarn start. You might try just starting over. However, to help your troubleshooting, this error typically happens when you try to use a Material-UI component and forget to import it. Have you tried commenting out all the code and seeing if it compiles?

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also Read

Please Rate Our Solution to Motivate Us For Give Our Best

Leave a Comment