I receive the following error: ```Could not find m...
# multiplatform
d
I receive the following error:
Copy code
Could not find method npm() for arguments [cheerio] on object of type org.jetbrains.kotlin.gradle.plugin.mpp.DefaultKotlinDependencyHandler.
I’m using the Groovy DSL
p
Hi Damiano, if I understand things correctly, then the syntax you use only works in Kotlin Gradle files (build.gradle.kts). If you use the Groovy DSL, you have to add npm dependencies on source sets using:
Copy code
kotlin {
    sourceSets["jsMain"].dependencies {
        implementation(npm("cheerio","1.2.3"))
    }
}
For more details, see: https://discuss.kotlinlang.org/t/npm-dependencies-with-kotlin-1-3-40/13174
d
Thanks @p2000t I’ll try to migrate to kts asap and then i’ll let you know