JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
16k stars 1.16k forks source link

lost NodeJsRootExtension !! #1155

Closed CMingTseng closed 3 years ago

CMingTseng commented 3 years ago

I try to build the last Todo app

but when l lost the project i get error !!

PS. if i rollback to early example ( base on JetBrains compose 0.4.0-build184 ) it is ok !!

A problem occurred configuring project ':web'.

Extension of type 'NodeJsRootExtension' does not exist. Currently registered extension types: [ExtraPropertiesExtension, KotlinMultiplatformExtension, KotlinTestsRegistry, DefaultArtifactPublicationSet, SourceSetContainer, ReportingExtension, JavaPluginExtension, JavaToolchainService, ComposeExtension, ScriptingExtension]

CMingTseng commented 3 years ago

@akurasov

Dear Sir

i found some ???

the demo

https://github.com/JetBrains/compose-jb/blob/8371226f66bbf13c6203d4a2ed9e5919c06eec85/examples/todoapp/web/build.gradle.kts#L1

import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension

i use kotlin 1.5.21 but i clcik "NodeJsRootExtension"

the ide open kotlin 1.4.31 ??!!

eymar commented 3 years ago

@CMingTseng please try to run it again. The workaround for webpack version was updated and merged: https://github.com/JetBrains/compose-jb/pull/1166 so examples should work again

CMingTseng commented 3 years ago

@CMingTseng please try to run it again. The workaround for webpack version was updated and merged: #1166 so examples should work again Dear Sir

i look the https://github.com/JetBrains/compose-jb/pull/1166

it fixed at kotlin 1.5.30 ?

but i also use pure Android compose project

the kotlin 1.5.30 will build fail !!

the build tip say add "suppressKotlinVersionCompatibilityCheck" ?

but it still fail !!

the pure Android compose project can build by kotlin 1.5.21

THX

eymar commented 3 years ago

The TodoApp example uses kotlin 1.5.21 version and compose 1.0.0-alpha2. If you want to try it with kotlin 1.5.30 then newer compose build has to be used, try it with 1.0.0-alpha4-build348

CMingTseng commented 3 years ago

The TodoApp example uses kotlin 1.5.21 version and compose 1.0.0-alpha2. If you want to try it with kotlin 1.5.30 then newer compose build has to be used, try it with 1.0.0-alpha4-build348

Dear Sir

very thanks

i run this todo app --- desktop/android with kotlin 1.5.21 version and compose 1.0.0-alpha2 is OK

but run web version

will get build fail !!

i ref this post https://youtrack.jetbrains.com/issue/KT-48273

add

import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension afterEvaluate { extensions.configure { versions.webpackDevServer.version = "4.0.0" } }

but get

Extension of type 'NodeJsRootExtension' does not exist. Currently registered extension types: [ExtraPropertiesExtension, KotlinMultiplatformExtension, KotlinTestsRegistry, DefaultArtifactPublicationSet, SourceSetContainer, ReportingExtension, JavaPluginExtension, JavaToolchainService, ComposeExtension, ScriptingExtension]

now i try ref https://github.com/JetBrains/compose-jb/pull/1166

upgrade to

kotlin 1.5.30 with compose 1.0.0-alpha4-build348

but i get new error !!

the "pure" Android compose project not suppoert kotlin 1.5.30 !!

if use kotlin 1.5.30 i will get https://youtrack.jetbrains.com/issue/IDEA-278282?replyTo=27-5196674

THX

CMingTseng commented 3 years ago

@eymar

very thx

i re-clone this project & clear build

https://github.com/CMingTseng/compose-jb/tree/lost_NodeJsRootExtension

now it work

https://youtrack.jetbrains.com/issue/KT-48781

THX

CMingTseng commented 3 years ago

this issue can close

because

afterEvaluate { rootProject.extensions.configure { versions.webpackDevServer.version = "4.0.0" } }

but i use

afterEvaluate { extensions.configure { versions.webpackDevServer.version = "4.0.0" } }

i lost " rootProject " !!

sorry for my stupid

THX

okushnikov commented 2 months ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.