Hey guys. I get this error running my web app. Wha...
# javascript
j
Hey guys. I get this error running my web app. What could be the issue? Android and server work fine. 
Copy code
FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':kotlinNpmInstall'.
> org.jetbrains.kotlin.gradle.targets.js.npm.KotlinNpmResolutionManager$ResolutionState$Installed cannot be cast to org.jetbrains.kotlin.gradle.targets.js.npm.KotlinNpmResolutionManager$ResolutionState$Configuring
m
Can you please post the kotlin block content of your build config?
j
Copy code
plugins {
    kotlin("js")
    kotlin("plugin.serialization")
}

dependencies {
    implementation(kotlin("stdlib-js"))

    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-js:1.3.5")
    implementation("org.jetbrains.kotlinx:kotlinx-html-js:0.7.1")
    implementation(npm("text-encoding"))
    implementation(npm("abort-controller"))
    implementation(npm("bufferutil"))
    implementation(npm("utf-8-validate"))
    implementation(npm("fs"))

    //React, React DOM + Wrappers (chapter 3)
    implementation("org.jetbrains:kotlin-react:16.13.0-pre.93-kotlin-1.3.70")
    implementation("org.jetbrains:kotlin-react-dom:16.13.0-pre.93-kotlin-1.3.70")
    implementation(npm("react", "16.13.0"))
    implementation(npm("react-dom", "16.13.0"))


    implementation(project(":common"))
}


kotlin {
    target {
        useCommonJs()
        browser {
            // <https://kotlinlang.org/docs/reference/javascript-dce.html#known-issue-dce-and-ktor>
            dceTask {
                keep("ktor-ktor-io.\$\$importsForInline\$\$.<http://ktor-ktor-io.io.ktor.utils.io|ktor-ktor-io.io.ktor.utils.io>")
            }
        }
    }
}
It works in the terminal but not in Android Studio. It displays the error. It's so funny 🤭
f
I have the same issue. @Jeff Did you resolve it?
j
It was working in the terminal. So I stuck to that.
f
Ok, thanks. I was hope for some IDE support 🙂