Does anyone have any problem with thisone, I was just following instructions on documentation and this error showed up.
Just a regular import:
import Slider from '@material-ui/lab/Slider';
| Tech | Version |
|--------------|---------|
| Material-UI | v1.2.1 |
| React | 16.4.0 |
| browser | any |
馃憢 Thanks for using Material-UI!
We use the issue tracker exclusively for bug reports and feature requests, however,
this issue appears to be a support request or question. Please ask on StackOverflow where the
community will do their best to help. There is a "material-ui" tag that you can use to tag your
question.
If you would like to link from here to your question on SO, it will help others find it.
If your issues is confirmed as a bug, you are welcome to reopen the issue using the issue template.
@MarioRozic Install @material-ui/lab
: https://unpkg.com/@material-ui/lab@1.0.0-alpha.5/Slider/index.js
Hello,
sorry to disturb you again with this but I have the same problem and I searched the web and found nothing. There is definitely something strange here. I use it this way:
import Slider from '@material-ui/lab/Slider';
I installed lab:
npm install @material-ui/lab
Then I get:
ERROR in ./node_modules/@material-ui/lab/esm/Slider/index.js
Module not found: Error: Can't resolve '@material-ui/core/Slider'
My env:
"react": "^16.8.6",
"@material-ui/lab": "^4.0.0-alpha.20",
"@material-ui/core": "^4.1.2"
Please advise.
Sorry, I had to update core:
npm install @material-ui/core
Then it worked!
Yes, the component was moved to the core :).
Run the following command in the your terminal/ cmd :
npm install @material-ui/lab
After successful installation, restart the server.
It will work properly.
You can check manually in your node_modules/@material-ui. You will find lab folder in it.
Most helpful comment
@MarioRozic Install
@material-ui/lab
: https://unpkg.com/@material-ui/lab@1.0.0-alpha.5/Slider/index.js