Error caused on addComponent()

Hi all, anybody could help to resolve it?

in project we use inheritance from Component, like

Base class

export class BaseComp extends Component {


child class:

export class HeroSkill extends BaseComp {


child class 2:

export class HeroSkill2 extends BaseComp {


then in other class we’re using

export class Manager extends Component {

private Skills: BaseComp = null;

init() {
this.Skills = this.node.addComponent(HeroSkill2); <----- this line caused error


error caused in the Editor (CC 3.5.0) :

TypeError: Class extends value undefined is not a constructor or null

I’ve tried to use same approach in empty project and it works fine, i’m confused.
What’s wrong ?