Hello everyone, I have some issues running my proj...
# javascript
t
Hello everyone, I have some issues running my project for JS with webpack. I use kingerence: inference-tfjs:0.2.21 and io.kingerence: adapter-mutlik-core-js: 0.2.21 The thing is: If i build using ./gradlew BrowserDevelopmentWebpack - all works fine If I do ./gradlew BrowserProductionWebpack - I have an issue when I run predict function from io.kinference.model and here is the function were the error happens. On that line: tmp_0.b77_1 = tmp_1 instanceof NumberNDArrayTFJS ? tmp_1 : THROW_CCE(); protoOf($applyCOROUTINE$88).sc = function () { var suspendResult = this.hc_1; $sm: do try { var tmp = this.fc_1; switch (tmp) { case 0: this.gc_1 = 2; var tmp_0 = this; var tmp_1 = ensureNotNull(this.a77_1.g1(0)).u40_1; tmp_0.b77_1 = tmp_1 instanceof NumberNDArrayTFJS ? tmp_1 : THROW_CCE(); this.fc_1 = 1; suspendResult = tidyNDArray(TreeEnsembleRegressorVer1$apply$slambda_0(this.y76_1, this.b77_1, null), this); if (suspendResult === get_COROUTINE_SUSPENDED()) { return suspendResult; } continue $sm; case 1: var output = suspendResult; return listOf(asTensor(output, 'Y')); case 2: throw this.ic_1; } } catch ($p) { var e = $p; if (this.gc_1 === 2) { throw e; } else { this.fc_1 = this.gc_1; this.ic_1 = e; } } while (true); }; does anyone faced that issue? Thanks
a
Am I right if I say that in production it throws
ClassCastException
? If so, could you please clarify what version of the compiler do you use?
t
Yes, you are right. I use kotlin("js") version 1.9.25
a
Could you please also check if it's reproduced on 2.0.0, 2.0.20 or 2.1.0?
t
sure, thanks!
a
Btw, do you intentionally use the kotlin("js") plugin? I'm not quite sure that it's not deprecated. As far as I know, currently the kotlin("multiplatform") is the recommended one
t
It's going to be deprecated soon yes, or already deprecated and we plan to change it. I just need to make it work now and then we migrate to multiplatform
kodee happy 1
a
Excellent, I'm just checking. Some of the examples were outdated, so people sometimes use the plugin unintentionally.
❇️ 1
Please let me know if the issue is (or is not) reproduced on the higher versions.
t
Yep, I'm checking it right now
no luck I guess I'll just go with BrowserDevelopmentWebpack and try to configure it as close to production build as possible
thank you color 1