我已经开始关注Material-UI,但是碰到了一堵砖墙。
我已经在我的应用程序中添加了Drawer
并且工作正常,但是当我尝试添加IconButton
时,我遇到了问题,我似乎无法找到原因。
我添加此行后,运行得很好的程序突然停止工作:
import IconButton from '@material-ui/core/IconButton';
因此导入行失败了。
错误是获取:
index.js:60 TypeError: Super expression must either be null or a function
at _inherits (inherits.js:7)
at TouchRipple.js?bed4:131
at Object.<anonymous> (TouchRipple.js?bed4:348)
at Object.631 (0.442234609d762135f910.hot-update.js:1349)
at __webpack_require__ (bootstrap 57e69e71aff13ca7b80a:555)
at fn (bootstrap 57e69e71aff13ca7b80a:86)
at Object.<anonymous> (ButtonBase.js?c334:44)
at Object.629 (0.442234609d762135f910.hot-update.js:800)
at __webpack_require__ (bootstrap 57e69e71aff13ca7b80a:555)
at fn (bootstrap 57e69e71aff13ca7b80a:86)
任何人都经历过同样的事情,并知道如何解决它?
答案 0 :(得分:0)
我发现了问题,而且我添加的项目有一个过时的React版本。当我更新到最新的一切工作正常。