close

[Solved] Can’t resolve ‘@material-ui/lab/DateTimePicker’

Hello Guys, How are you all? Hope You all Are Fine. Today I am facing following error even I have material-ui/lab installed Can’t resolve ‘@material-ui/lab/DateTimePicker’ 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 Can’t resolve ‘@material-ui/lab/DateTimePicker’ Error Occurs ?

I am facing following error even I have material-ui/lab installed.

Can't resolve '@material-ui/lab/DateTimePicker'

How To Solve Can’t resolve ‘@material-ui/lab/DateTimePicker’ Error ?

  1. How To Solve Can't resolve '@material-ui/lab/DateTimePicker' Error ?

    To Solve Can't resolve '@material-ui/lab/DateTimePicker' Error You Just need to install material-ui/core and material-ui/lab Just run this command One by one. First of all Just delete node_modules folder and then Run this command: npm install @material-ui/[email protected] Then, Run: npm install @material-ui/[email protected] Now run npm install to recreate node_module: npm install Now, Your error must be solved.

  2. Can't resolve '@material-ui/lab/DateTimePicker'

    To Solve Can't resolve '@material-ui/lab/DateTimePicker' Error Just make Sure You are using 5.0.0-alpha.24 Or Above vesion. Just define thsis both line in package.json. Now, Your error must be solved.

Solution 1: Use material-ui/core and lab to 5.0.0-alpha.24

Just make Sure You are using 5.0.0-alpha.24 Or Above vesion. Just define thsis both line in package.json.

{
  "dependencies": {

    "@material-ui/core": "5.0.0-alpha.24",
    "@material-ui/lab": "5.0.0-alpha.24",

  },
}

Now, Your error must be solved.

Solution 2: install material-ui/core and material-ui/lab

You Just need to install material-ui/core and material-ui/lab Just run this command One by one. First of all Just delete node_modules folder and then Run this command.

npm install @material-ui/[email protected]

Then, Run.

npm install @material-ui/[email protected]

Now run npm install to recreate node_module.

npm install

Now, Your error must be solved.

Summary

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