控制台报错Uncaught (in promise) TypeError: Super expression must either be null or a function错误来源分析

控制台报错Uncaughtin promiseTypeError: Super expression must either be null or a function错误来源分析题

错误截图

inherits.js?262e:4 Uncaught (in promise) TypeError: Super expression must either be null or a function
    at _inherits (inherits.js?262e:4)
    at eval (index.tsx?644a:6)
    at eval (index.tsx?644a:26)
    at Module../src/pages/cart/tip/index.tsx (9.js:227)
    at __webpack_require__ (app.js:64)
    at eval (cart.tsx:18)
    at Module../src/pages/cart/cart.tsx (9.js:88)
    at __webpack_require__ (app.js:64)

在这里插入图片描述
我从github上边clone下来别人的项目,在对他进行个性化修改,以及一些js转ts过程中报错

错误分析与解决方案(一)

在这里插入图片描述
可能是组件的主入口,我对他进行了一些修改,但是主入口下边引用的一些子组件我没有进行一些修改,他在运行到子组件的时候,发现了一些错误,控制台直接抛出错误
解决方法:对子组件进行相关修改

错误分析与解决方案(二)

可能是子组件的default export 错误
我们出错语句是export default class Footer extends React.ComponentP{},应该写成export default class Footer extends React.Component{},将React.Component改为正确写法就ok了
错误来源:https://blog.csdn.net/HJBZF/article/details/86064397

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值