iseki
01/18/2020, 3:38 AMepabst
01/18/2020, 2:39 PMGrantas33
01/19/2020, 9:51 AMMax
01/19/2020, 9:05 PMNikky
01/20/2020, 5:19 AMhttps://i.imgur.com/Zgf1rE8.png▾
iseki
01/20/2020, 9:27 PMegorand
01/20/2020, 10:19 PM19 01 2020 20:45:29.838:INFO [karma-server]: Karma v4.4.1 server started at <http://0.0.0.0:9876/>
19 01 2020 20:45:29.842:INFO [launcher]: Launching browsers Chrome with concurrency unlimited
19 01 2020 20:45:29.848:INFO [launcher]: Starting browser Chrome
19 01 2020 20:46:29.967:WARN [launcher]: Chrome have not captured in 60000 ms, killing.
19 01 2020 20:46:31.977:WARN [launcher]: Chrome was not killed in 2000 ms, sending SIGKILL.
19 01 2020 20:46:34.018:WARN [launcher]: Chrome was not killed by SIGKILL in 2000 ms, continuing.
java.lang.IllegalStateException: command '/Users/travis/.gradle/nodejs/node-v10.15.3-darwin-x64/bin/node' exited with errors (exit code: 1)
I started with the following configuration:
kotlin {
js {
nodejs()
browser()
}
}
which AFAIK uses headless Chrome by default, and later changed to this without much luck:
kotlin {
js {
nodejs()
browser {
testTask {
useKarma {
useChrome()
}
}
}
}
}
I'm unable to reproduce the issue locally. Has anyone had similar failures and managed to work around them?glade
01/21/2020, 1:37 AMBoris Dudelsack
01/21/2020, 2:47 PM@file:JsModule("@bootstrap-styled/provider/lib/BootstrapProvider")
package bootstrap
import react.*
@JsName("BootstrapProvider")
external class BootstrapProvider : Component<RProps, RState> {
override fun render(): ReactElement?
}
pjagielski
01/21/2020, 7:42 PMdate
is shared jvm/js DTO ?glade
01/21/2020, 9:32 PMtasks {
withType<KotlinJsDce> {
dceOptions {
devMode = false
}
// NOTE: Keep settings don't seem to work at all. Have tried each individually, and normal package/namespace expressions.
keep("com.gigwell.PresetType", "com.gigwell", "com.gigwell.*")
}
}
This is currently being invoked via the webpackTask but I’m guessing this is more my misunderstanding of the dce parameter?fcosta
01/22/2020, 12:20 AM> Task :frontend:compileKotlinJs FAILED
w: Module "kotlin-react-dom" is defined in more than one file
w: Module "kotlin-react-router-dom" is defined in more than one file
w: Module "kotlin-react" is defined in more than one file
w: Module "kotlin-extensions" is defined in more than one file
w: Module "kotlinx-html-js" is defined in more than one file
e: warnings found and -Werror specified
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':frontend:compileKotlinJs'.
> Compilation error. See log for more details
Any idea how can I debug this error or disable the warnings? I will write the build.gradle
in the threadLamberto Basti
01/22/2020, 1:08 PMankushg
01/22/2020, 7:09 PMkotlinx.serialization
almost exclusively to map from Kotlin Enum Classes to `Int`/`String`s for JS, because our deeply nested classes make it difficult to handwrite methods that accept primitives and map them to Kotlin enum classes.
• Is there any way to have Kotlin expose enum class
es as `String`/`Int` values in JS, instead of generated Kotlin classes?
• Will 1.4 be able to expose Kotlin enums as legit Typescript enum constants?
• Is this something that we need `inline enum class`es to solve?fcosta
01/23/2020, 1:44 AMDukat
in order to allow the automatic conversion of TypeScript declaration files and I'm having some issues. I will post in the thread!Jue
01/23/2020, 8:33 PMWe have a JS library that needs to be loaded on the page to render some content. We are looking into moving some pieces of this library to KotlinJS. As such we have noticed that render performance on the page is very sensitive to our library's size, so we want to keep it as small as possible without any external dependencies. But so far it seems like JS generated by Kotlin has dependecy on `kotlin.js`, which needs to be loaded in browser before transpiled JS. We tried minifying+gziping kotlin.js, and it is still ~150kb in size, which is a deal breaker for us. So I wanted to confirm here if there is any possible way to not have to load `kotlin.js` and instead inline all the dependecies in the transpiled JS itself, or load only needed parts of it. Thanks.
tylerwilson
01/24/2020, 3:13 PMGrantas33
01/26/2020, 8:24 AMbuild/js/packages_imported/ktor-ktor-client-core/1.3.0/ktor-ktor-client-core.js
Module not found: Error: Can't resolve 'abort-controller' in 'build\js\packages_imported\ktor-ktor-client-core\1.3.0'
build/js/packages_imported/ktor-ktor-io/1.3.0/ktor-ktor-io.js
Module not found: Error: Can't resolve 'text-encoding' in 'build\js\packages_imported\ktor-ktor-io\1.3.0'
I'm having these errors in the browser console of my KotlinJS project. I'm not using ktor as a direct dependency - I use a kotlin multiplatform library which uses ktor. I've had the same errors when developing the aforementioned library, and after adding jsMain npm dependencies in the library's build gradle file like this:
api(npm("text-encoding"))
api(npm("abort-controller"))
the errors dissapeared from the library. However, they still do exist in my KotlinJS project which uses this library. What could be the issue here?Tobi
01/27/2020, 7:38 AMerror Couldn't find package "@jetbrains/kotlin-inline-style-prefixer@1.0.0-pre.89" required by "cats-js@1.0.0-SNAPSHOT" on the "npm" registry.
That's how I configured the dependency:
kotlin {
target {
browser {}
nodejs {}
}
sourceSets {
main {
dependencies {
implementation kotlin('stdlib-js')
implementation kotlin('test-js')
implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime-js:0.14.0"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core-js:1.3.2'
implementation "io.ktor:ktor-client-js:1.2.6"
implementation "io.ktor:ktor-client-json-js:1.2.6"
implementation("io.ktor:ktor-client-serialization-js:1.2.6")
implementation(npm("core-js", "^2.0.0"))
implementation(npm("@jetbrains/kotlin-react", "16.9.0-pre.83"))
implementation(npm("@jetbrains/kotlin-react-dom", "16.9.0-pre.83"))
implementation(npm("@jetbrains/kotlin-extensions", "1.0.1-pre.67"))
implementation(npm("@jetbrains/kotlin-extensions", "1.0.1-pre.67"))
implementation(npm("@jetbrains/kotlin-styled", "1.0.0-pre.89"))
implementation(npm("@jetbrains/kotlin-css", "1.0.0-pre.89"))
implementation(npm("@jetbrains/kotlin-inline-style-prefixer", "1.0.0-pre.89"))
implementation(npm("react", "16.8.3"))
implementation(npm("react-dom", "16.8.3"))
implementation(npm("kotlinx-html", "0.6.12"))
api(npm("text-encoding","0.7.0"))
}
}
}
}
Furthermore I added the alias as I've done it previously for other dependencies:
// workaround for <https://youtrack.jetbrains.com/issue/KT-31807>
config.resolve.alias = {
'kotlin-css-js': '@jetbrains/kotlin-css-js',
'kotlin-extensions': '@jetbrains/kotlin-extensions',
'kotlin-react': '@jetbrains/kotlin-react',
'kotlin-react-dom': '@jetbrains/kotlin-react-dom',
'kotlin-styled': '@jetbrains/kotlin-styled',
'kotlin-css': '@jetbrains/kotlin-css',
'kotlin-inline-style-prefixer': '@jetbrains/kotlin-inline-style-prefixer',
'kotlinx-html-js': 'kotlinx-html',
};
Any idea what could be the problem?
Thanks in advance!AJ Alt
01/27/2020, 6:35 PMjs { nodejs {} }
, how do I access Node global objects like process
etc. from the jsMain
source set?Big Chungus
01/28/2020, 1:26 PM$ dukat index.d.ts
/usr/local/lib/node_modules/dukat/lib/converter.js:401
var packageNameFragments = sourceFile.fileName.split("/");
^
TypeError: Cannot read property 'fileName' of undefined
Big Chungus
01/28/2020, 1:55 PMUncaught TypeError: g is not a function
after running dce on my page. Any suggestions how to investigate/resolve this?Brandon Saunders
01/30/2020, 1:46 AMprab
01/30/2020, 5:53 AMJue
01/30/2020, 7:42 AMcorneil
01/30/2020, 8:32 AMSean Keane
01/30/2020, 9:09 AMJess Brent
01/30/2020, 2:14 PMJanelle Fullen
01/30/2020, 9:53 PM-Xir-produce-js
-Xgenerate-dts
However, the compiler can't find the Kenneth Andersson
01/31/2020, 9:22 AMKenneth Andersson
01/31/2020, 9:22 AMIlya Goncharov [JB]
02/02/2020, 7:46 AMnodejs {
testTask {
useMocha {
timeout = "10s"
}
}
}
Kenneth Andersson
02/03/2020, 8:07 AMyogi
05/07/2020, 12:32 PMkarma
) , here is how I did it:
• Create karma.config.d
in the project directory
• Atleast kotlin-gradle 1.3.71
checks this directory for an js
files and blindly appends them to the generated karma.conf.js
[1]
• Create a file karma.config.d/mocha-timeout-override.s
with following content [2]
config.set({
"client": {
"mocha": {
"timeout": 5000
},
},
});
[1] https://github.com/JetBrains/kotlin/blob/7fe66d3456a2e51e5bf228497e81b28a6367766c/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/targets/js/testing/karma/KotlinKarma.kt#L44
[2] http://blog.jonathanargentiero.com/overriding-karma-mocha-default-timeout-2000ms/