Super expression must either be null or a function.
如果是在react出现这种错误,很大可能就是你引用类的时候单词写错了
例如:class Clocks extends React.Component 写错成 class Clocks extends ReactDOM.Component
或者是把Component写成了Compontent、compontent、Compontents。。。之类的
参考自:
https://blog.csdn.net/T_T7729/article/details/88535439
https://www.cnblogs.com/mianbaodaxia/p/6170726.html
但是,难受的是,我是在vue项目中报错。
一开始猜测 可能是import时写错,检查是所有import的地方,并没发现问题。
关键的一点:我是在运行打包后的项目才会报这种错误,本地调试是没有问题的。
所以,我开始找build时用到的配置文件,最后在vue.config.js中找到有问题的配置项,修改后再次打包,问题解决。