Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
137
rated 0 times [  141] [ 4]  / answers: 1 / hits: 31644  / 4 Years ago, fri, april 10, 2020, 12:00:00

I have installed material-ui/lab in order to user the alert component, but whenever i import it with: import Alert from '@material-ui/lab/Alert'; it fails to compile and throws this error:



./node_modules/@material-ui/lab/esm/internal/svg-icons/SuccessOutlined.js
Attempted import error: 'createSvgIcon' is not exported from '@material-ui/core/utils'.


So I tried to google this problem and found another question about the material-ui/lab/AutoComplete component (This question exactly) and the accepted answer was to update the material-ui/core to version 4.9.9, and it looks like it worked for the guy who asked, but sadly not for me, i have this versions of all the installed material-ui things:



    @material-ui/core: ^4.9.9,
@material-ui/icons: ^4.9.1,
@material-ui/lab: ^4.0.0-alpha.48,


so now i'm asking u guys if there is another way to solve this problem, thanks


More From » node.js

 Answers
22

This issue is reported here and closed as the latest version of /core and lab fixes the issue:
https://github.com/mui-org/material-ui/issues/20482



I had the same error and using this combination of versions fixed the problem:



@material-ui/core: ^4.9.10
@material-ui/lab: ^4.0.0-alpha.49


Hope this helps


[#51054] Thursday, April 2, 2020, 4 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
aidan

Total Points: 72
Total Questions: 95
Total Answers: 121

Location: Uzbekistan
Member since Sat, Feb 27, 2021
3 Years ago
aidan questions
Mon, Oct 11, 21, 00:00, 3 Years ago
Wed, Sep 29, 21, 00:00, 3 Years ago
Sun, Sep 5, 21, 00:00, 3 Years ago
Thu, Jan 16, 20, 00:00, 4 Years ago
;