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/AdapterDateFns’ 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/AdapterDateFns’ Error Occurs ?
I am facing following error even I have material-ui/lab installed.
Can't resolve '@material-ui/lab/AdapterDateFns'
How To Solve Can’t resolve ‘@material-ui/lab/AdapterDateFns’ Error ?
How To Solve Can’t resolve ‘@material-ui/lab/AdapterDateFns’ Error ?
To Solve Can’t resolve ‘@material-ui/lab/AdapterDateFns’ 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/core@next Then, Run: npm install @material-ui/lab@next Now run npm install to recreate node_module: npm install Now, Your error must be solved.Can’t resolve ‘@material-ui/lab/AdapterDateFns’
To Solve Can’t resolve ‘@material-ui/lab/AdapterDateFns’ 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/core@next
Then, Run.
npm install @material-ui/lab@next
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