Uncaught SyntaxError: 'super' keyword unexpected here
时间: 2023-11-13 16:56:58 浏览: 59
这个错误通常是因为在子类的 constructor 中使用了 super 关键字,但是在其父类中并没有定义 constructor。可以尝试在父类中添加一个空的 constructor,例如:
```
class Parent {
constructor() {}
}
class Child extends Parent {
constructor() {
super();
}
}
```