Anyone else getting ```Task :jsBrowserTest java.la...
# javascript
a
Anyone else getting
Copy code
Task :jsBrowserTest
java.lang.IllegalStateException: command '/home/runner/.gradle/nodejs/node-v16.13.0-linux-x64/bin/node' exited with errors (exit code: 134)
After bumping to 1.6.20? I am getting this on CI and my machine as well
t
FYI - Works fine with Node
16.14.2
a
I am not too attached to the node version. I don't think I am setting it up anywhere in my
build.gradle.kts
how do I use the inbuilt version?
By inbuilt, I mean the node version that comes bundled with the KGP?
The most confusing thing here is that
jsNodeTest
has no problems executing at all
So, after a clean build, I am getting a new "exit code: 1"
For some reasons
jsBrowserTest
is trying to load
.kt
files. Which fails the build as webpack doesn't have a loader to process this kind of files. I am getting a bunch of errors like this in the console
Copy code
Module parse failed: Invalid regular expression flag (1:1)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See <https://webpack.js.org/concepts#loaders>
> /mnt/agent/work/8d547b974a7be21f/ktor-client/ktor-client-core/common/src/io/ktor/client/call/HttpClientCall.kt
It gets even worse, coz now webpack is trying to load
build.gradle.kts
files
Copy code
Module parse failed: Unexpected token (1:8)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See <https://webpack.js.org/concepts#loaders>
> plugins {
|     kotlin("js")
|     kotlin("plugin.serialization")
What is even more interesting, this doesn't happen at all when testing for the node environment, only browser. For those who have bumped to 1.6.20, how do you run your browser tests??
r
All my browser tests in KVision work fine with 1.6.20
1
They seem to run in parallel now
a
Maybe my aditional Karma config is getting in the way. Let me try to take them away
r
This is a strange path
/mnt/agent/work/8d547b974a7be21f/ktor-client/ktor-client-core/common/src/io/ktor/client/call/HttpClientCall.kt
. Is this your project directory here?
a
No, it is not in my path, how ever I am using ktor client as dependency in my project
Going on with the hunt here, it seems turning off incremental compilation
<http://kotlin.incremental.js.ir|kotlin.incremental.js.ir>=false
makes my builds pass. Hypothesis is, having incremental compilation with dependencies compiled with earlier versions might be the ones causing the error. I have tried publishing my dependencies but now maven central has issues, so I'll have to wait to have a conclusion on this hypothesis
Hypothesis has been proven to be partially correct. Even with using updated dependencies I still get the errors, but turning off incremental compilation makes the error go away. So, it is incremental compilation that has the issue and at the moment it is not as per my previous assumption that dependencies compiled with a compiler prior to 1.6.20 where causing incremental compilations to work