I have a multiplatform project, with a shared modu...
# javascript
d
I have a multiplatform project, with a shared module. When I run “assemble” on the js project, I get this error:
Execution failed for task ':shared:jsPackageJson'.
> NPM Dependencies already resolved and installed
at org.jetbrains.kotlin.gradle.targets.js.npm.KotlinNpmResolutionManager.requireConfiguringState$kotlin_gradle_plugin(KotlinNpmResolutionManager.kt:122)
at org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinPackageJsonTask.getCompilationResolver(KotlinPackageJsonTask.kt:26)
at org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinPackageJsonTask.getPackageJson(KotlinPackageJsonTask.kt:50)
any idea?
t
Do you have non-applied plugins in root? Like here
d
@turansky if I use
kotlin("js") apply false
the tasks even disappear from the gradle window
t
apply false
- must be used for root project, if root project is aggregator
Copy code
/root      - "apply false" only here
  /shared  - multiplatform
  /js      - js
d
I have now root:
Copy code
plugins {
    kotlin("js") apply false
}
shared:
Copy code
plugins {
    kotlin("multiplatform")
    kotlin("plugin.serialization")
    id("com.android.library")
}
web:
Copy code
plugins {
    kotlin("js")
}
and I get the error:
Build file 'myproject/build.gradle.kts' line: 4
Plugin [id: 'org.jetbrains.kotlin.js', apply: false] was not found in any of the following source
t
No repos in
root
?
d
Copy code
plugins {
    kotlin("js") apply false
}
buildscript {
    repositories {
        gradlePluginPortal()
        jcenter()
        google()
        mavenCentral()
    }
    dependencies {
        classpath("com.android.tools.build:gradle:4.2.0-alpha11")
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}")
        classpath("org.jetbrains.kotlin:kotlin-serialization:${Versions.kotlin}")
    }
}
repositories {
    google()
    jcenter()
    mavenCentral()
    maven("<https://kotlin.bintray.com/kotlin-js-wrappers/>")
}
t
buildscript
😞
d
what do you mean?
t
plugins
- new mode
buildscript
- old mode Mix effect - undefined
d
these
buildscript
is what the Android Studio Canary wizard creates for a new multiplatform project do you know how to specify those 3
classpath
using the plugins syntax ?
🚫 1
ok, I just opened an issue:
a
had same issue here