Hello, I wanted to try the now Kotlin/JS, especia...
# javascript
t
Hello, I wanted to try the now Kotlin/JS, especially the npm support. I create a new project in Intellij (Gradle, with Kotlin DSL, and Kotlin/Js/Browser). Running it works just fine. But I have a message when I want to edit
build.gradle.kts
,
There were some errors during scripts dependencies resolution, some resolution might be missing
. When I try to use the function
npm
it says it’s unresolved:
implementation(npm("lib", "0.0.0"))
I am using Kotlin 1.3.41
s
Hi. Please show your Gradle logs at: - Windows:
Application Data/gradle-kotlin-dsl/log
- Linux:
~/.gradle-kotlin-dsl/log
- Mac:
~/Library/Logs/gradle-kotlin-dsl
Note,
1.3.41
is not yet released
t
Hmm about
1.3.41
resolver-2019-07-03-17-15-33-455.log
s
Hmm about
1.3.41
Apparently he was in the process release, but still not all artifacts were published. It is just released: https://twitter.com/kotlin/status/1146728899176488960
Thanks for the logs, I’ll see.
Could you share your
kexpense/build.gradle.kts
?
t
Sure
Copy code
plugins {
    id("org.jetbrains.kotlin.js") version "1.3.40"
}

group = "com.tristan"
version = "1.0-SNAPSHOT"

repositories {
    mavenCentral()
    jcenter()
}

kotlin {
    target {
        browser()

        sourceSets {
            main {
                dependencies {
                    implementation(kotlin("stdlib-js"))
                    implementation("org.jetbrains.kotlinx:kotlinx-html-js:0.6.12")
                    implementation(npm("hyperhtml", "2.29.4"))
                }
            }
        }
    }
}
I fixed it. It was coming from Gradle. What I did, I configured the project to work with my local gradle and not with the wrapper generated by Intellij
👍🏻 2
j
I'm having the same problem but , gradle Wrapper setup properly
Even with new project created by using wizard
s
@Juanoterocas can you please show your log files?
Copy code
- Windows: `Application Data/gradle-kotlin-dsl/log`
- Linux: `~/.gradle-kotlin-dsl/log`
- Mac: `~/Library/Logs/gradle-kotlin-dsl`
It would be good to create ticket in youtrack : https://youtrack.jetbrains.com/issues/KT
j
resolver-2019-07-17-08-46-02-360.log