I seem to have the same issue as <@U0C2KTK3J> and ...
# javascript
b
I seem to have the same issue as @Nicholas Bilyk and I can't find a solution. Do you have any ideas what's wrong? https://kotlinlang.slack.com/archives/C0B8L3U69/p1590117705268000
Copy code
/home/.../IdeaProjects/.../build/js/node_modules/kotlinx-html-js/kotlinx-html-js.js:11
}(this, function (_, Kotlin) {
 ^
ReferenceError: HTMLLegendElement is not defined
    at /home/.../IdeaProjects/.../build/js/node_modules/kotlinx-html-js/kotlinx-html-js.js:65:29
    at /home/.../IdeaProjects/.../build/js/node_modules/kotlinx-html-js/kotlinx-html-js.js:5:5
    at Object.<anonymous> (/home/.../IdeaProjects/.../build/js/node_modules/kotlinx-html-js/kotlinx-html-js.js:11:2)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (/home/.../IdeaProjects/.../build/js/node_modules/kotlin-wrappers-kotlin-react-dom-jsLegacy/kotlin-wrappers-kotlin-react-dom-jsLegacy.js:2472:106)

FAILURE: Build failed with an exception.
I'm using gradle 5.1, kotlin 1.4.M3
Copy code
plugins {
    id("org.jetbrains.kotlin.js")
}

repositories {
    mavenCentral()
    maven("<https://dl.bintray.com/kotlin/kotlinx>")
    maven("<https://dl.bintray.com/kotlin/kotlin-eap>")
    maven("<https://kotlin.bintray.com/kotlin-js-wrappers>")
}

dependencies {
    implementation("org.jetbrains:kotlin-react:16.13.1-pre.109-kotlin-1.4-M3")
    implementation("org.jetbrains:kotlin-react-dom:16.13.1-pre.109-kotlin-1.4-M3")
    implementation(npm("react", "16.13.1"))
    implementation(npm("react-dom", "16.13.1"))
}

kotlin {
    js {
        nodejs()
        binaries.executable()
    }
}
t
nodejs()
->
browser()
?
These dependencies are already declared in wrappers:
Copy code
implementation(npm("react", "16.13.1"))
    implementation(npm("react-dom", "16.13.1"))
}
b
well it works but it doesn't reeload the changes now
I mean it detects the changes and tries to refresh the page but the sources stay the same
t
Try run
./gradlew clean
before
d
Did you find a solution to this?
b
I'm quite sure I did @dazza5000 but I'm not sure how I did it- I can send you a working kotlin/js project tho (assuming it's still there on a different pc). Do you want it?
d
It's okay - i think there is a bug/pr fix for it in the kotlin/js repo
will wait for the next release
b
well it was working fine after I worked it out
it was not a hacky solution
I've probably just misconfigured something
d
well - if you have a working solution im up for that too
b
I must've deleted it, sorry 😞
d
Lol np