RocketChat / Rocket.Chat.Apps-cli

The CLI for interacting with Rocket.Chat Apps
MIT License
46 stars 27 forks source link

Class hierarchy causes unexpected Typescript error #125

Open GJKrupa opened 2 years ago

GJKrupa commented 2 years ago

In my app I've included a class hierarchy with a base and a derived class in the same directory (./src). If I attempt to instantiate an instance of the derived class I see the following error when packaging the app:

❯ rc-apps package
packaging your app... !
    TypeError: Class extends value undefined is not a constructor or null

The code is valid and compiles if I use npx tsc.

See https://github.com/GJKrupa/rocketchat-cli-125 for an example

If I remove the call to the derived class constructor or remove the class hierarchy then the error goes away

GJKrupa commented 2 years ago

This appears to be a recent regression since the app compiles successfully with version 1.9.0 of the CLI.

OrigamiKill commented 2 years ago

+1 on version 1.10.1

kirillk77 commented 2 years ago

I can confirm this bug and the workaround related to 1.9.0.

Thank you, @GJKrupa

ankar84 commented 2 years ago

@d-gubert hey, Douglas! Can you take a look at that issue?