我已经开始考虑Material-UI了,但是碰壁了。
我已经在我的应用程序中添加了一个Drawer
,它工作得很好,但是当我尝试添加一个IconButton
时,我遇到了一个问题,我似乎找不到原因。
我的程序,运行得很好,在我添加了这一行后突然停止工作:
import IconButton from '@material-ui/core/IconButton';
因此,在导入行上出现了故障。
get错误是:
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)
有没有人有过同样的经历,并且知道如何修复它?
发布于 2018-05-28 14:11:11
我发现了问题所在,我所添加的项目有一个过时的React版本。当我更新到最新版本时,一切工作正常。
https://stackoverflow.com/questions/50541258
复制相似问题