I'm trying `1.4-M1` but `./gradlew run` no longer ...
# javascript
m
I'm trying
1.4-M1
but
./gradlew run
no longer exists. What should I use instead?
t
browser
target?
prcessExecutable()
? Both used?
m
oops just
kotlin.target.browser { }
Copy code
plugins {
    id("org.jetbrains.kotlin.js") version "1.4-M1"
}
is OK? 😕
i
you should add
kotlin { target { useCommonJs() produceExecutable() browser {} } }
m
k, thanks guys. that helped
now I'm getting
Error:kotlin: Could not find "/Users/maio/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.4-M1/18b564b5b182481143f441f1b99cc2d11fc3f9a4/kotlin-stdlib-common-1.4-M1.jar" in [/Users/maio/Library/Application Support/kotlin/daemon].
😕
t
EAP repos required
m
I have
Copy code
repositories {
    mavenCentral()
    maven("<https://dl.bintray.com/kotlin/kotlin-eap>")
    maven("<https://kotlin.bintray.com/kotlinx>")
    maven("<https://dl.bintray.com/kotlin/kotlin-dev>")
    maven("<https://kotlin.bintray.com/kotlin-js-wrappers/>")
    jcenter()
}
hmm now it works. I upgraded gradle from 5.2.1 to 6.2 & restarted idea
well, works.
./gradlew run
doesn't fail. but js is somehow broken
Uncaught TypeError: _this_._set_a_ is not a function
t
ir
?
Do you use
@JsExport
?
m
yes ir, I have just simple script with main function. do I need to use JsExport?
I'm using kotlin-react
t
@JsExport
required if you want export your methods/classes
Otherwise you will have ‘empty’ js
b