Reputation: 41
I am trying to learn kotlin and I was following tutorial Building Web Applications with React and Kotlin/JS from official kotlin site, but I have a problem with build.gradle.kts
file, it says:
unresolved reference
every time npm
appears in this file.
I did everything like in the tutorial and honestly don't know what's a problem here. Do I need to include something else? I have npm installed on my computer so I believe this is another problem.
Upvotes: 2
Views: 1159
Reputation: 1
I hit the same issue with following the same tutorial I resolved it declaring npm dependencies like:
kotlin {
sourceSets["main"].dependencies {
implementation(npm("react", "16.12.0"))
implementation(npm("react-dom", "16.12.0"))
}
}
Upvotes: 0
Reputation: 41
Ok, so the problem was with Intellij. If it shows you that you have up-to-date version of Kotlin and it's not 3.70 then you need to update Intellij, because it's Intellij issue. After updating intellij, kotlin and changing plugin version in build.gradle.kts everything works fine. Maybe this answer will help someone with same issue.
Upvotes: 2