I am getting the below error when I use npm depend...
# javascript
g
I am getting the below error when I use npm dependencies in my grade.build.kts file and then sync in IntelliJ:
And here is my build.gradle.kts file:
How can I fix this issue?
l
g
So there currently isn't a fix? We can't use npm dependencies?
l
I managed to do it. Have a look here: https://github.com/lamba92/firebase-multiplatform https://github.com/CesareIurlaro/Android-Application In both cases upgrading to Kotlin 1.3.61+ fixed the issue. I am also using Gradle 6+ and IntelliJ Kotlin Plugin version 1.3 eap. Good luck!
Also note that it is an error of the IDE not of the build. From command line it works flawlessly.
g
Ok, I will try out upgrading my Kotlin plugin, I am using 1.3.7EAP in Gradle but am not using the same version for Intellij
So that didnt work, and in neither of your examples are you using the npm() function. So obviously it wasn't because of upgrading to 1.3.61+.... You just arent using npm()
a
For some reasons, I am getting this bug now. Adding an npm dependency like
Copy code
impmentation(npm("@react-native-async-storage/async-storage", vers.npm.asyncStorage))
Makes IDEA fail to sync with both
kotlin("multiplatform")
and
kotlin("js")
plugins. The comandline build works just fine. It is just IDEA that is failing to sync and import the sub modules with a declared dependency. This has never been a problem previously. What changed?? Been using 1.5.31 from the day it came out. I have been getting this weird flick for 4 days straight now. Help? Kotlin 1.5.31 IDEA 2021.1.3 (CE)