Gradle configuration error: Cannot add extension with name 'kotlinNodeJs'
See original GitHub issueIn multiplatform project which is also muiltiproject: as soon as I add id 'kotlinx-serialization' version '1.3.40'
to plugins
of one of subprojects, gradle can no longer configure other subprojects and fails with the following error:
Cannot add extension with name ‘kotlinNodeJs’, as there is an extension already registered with that name.
Environment
- Kotlin version: 1.3.40
- Kotlin platforms: Multiplatform
- Gradle version: 4.10.3
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (5 by maintainers)
Top Results From Across the Web
Cannot add extension with name 'kotlin', as there is an ...
In build.gradle we were using it like : apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions'. In build.gradle.kts it ...
Read more >Set up a Kotlin/JS project
js Gradle plugin that provides project configuration tools together with helper tasks for automating routines typical for JavaScript development ...
Read more >Gradle error: Cannot add extension with name 'sonarRunner ...
When project B depends on project A and we invoke project A's build from project B using the "settings.gradle" mechanism.
Read more >Running on Apple M1 - Installation and setup - OPENRNDR
I saw that there had been no movement on this issue (Feature request: ... add 'kotlin.mpp.stability.nowarn=true' to the Gradle properties.
Read more >Disabling Node.js download in KotlinJS Gradle plugin-kotlin
The NodeJsRoot plugin applies itself, which causes the NodeJsRootExtension to be included under the name kotlinNodeJs . Thus, I believe, any of the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was able to replicate the problem. The issue occurs when I include a Kotlin multi-platform project with browser support in another that uses “kotlinx.serialization” library. I will create a project with that problem later.
I get this issue when I try to apply the plugin into a Kotlin JS project for browsers. This is the complete error:
I am using these plugins:
I tried to use (apply false) but this did not work.