Running ./gradlew run within a terminal show the following issue for both (ir, legacy) backend. However, the detailed message could look a bit different for each case:
# kotlin.js.compiler=legacy
> Task :nodeRun FAILED
Starting TaskApp
/anywhere/kotlin-js-es6-inheritance/src/main/kotlin/Main.kt:3
class TaskApp: App () {
^
TypeError: Class constructor App cannot be invoked without 'new'
Information
- The nvmrc file can be used to create a local environment using
nvm installornvm use, but it is not a requirement. - A sample npm project containing an es6 class export is linked as dependency and will be present in the node_modules build directory.
- The actual kotlin definition has been created with dukat (
./gradlew generateExternals). The content has then been manually copied and enhanced with a file:JsModule annotation at package level. It would otherwise not create the neededrequire('app')statement.