I try download kotlin dev version with `npm()` fun...
# javascript
f
I try download kotlin dev version with
npm()
function in my Gradle but throw error:
Copy code
Execution failed for task ':kotlinNpmInstall'.
> Cannot find kotlin@1.4.0-M2 in yarn.lock
In yarn exists 1.4.0-M2 version (attach img.)
Copy code
dependencies {
    implementation(npm("kotlin", "1.4.0-M2"))
}
i
Failed to reproduce with a dummy project. Can you attach a link to your project?
a
also, I see that you are using gradle, why don't you just use
Copy code
dependencies{
   implementation(kotlin("stdlib-js","1.4.0-M2"))
}
f
@andylamax,
kotlin("stdlib-js")
installs the same node package as
npm()
?
a
Yes. actually, the one in npm was built from stdlib-js by the kotlin/js compiler. However, if you intend to use kotlin-stdlib-js from javascript, I am not sure if the gradle dependency would work. But if you are writing in kotlin, that should defenetly do the trick and it is a better approach
f
Failed to reproduce with a dummy project. Can you attach a link to your project?
@Ivan Kubyshkin [JetBrains], Sry for the delay in replying: If you want to try it I have this Scratch Project Gradle Build where I call
npm()
function. With Andy answer I have solved it.
a
Your welcome frank