Robert Munro
06/07/2021, 7:55 PMval commonMain by getting {
dependencies {
implementation(project(":shared"))
implementation("org.jetbrains.kotlinx:kotlinx-datetime:$ver_kotlinx_datetime")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:$ver_kotlinx_serialization_core")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:$ver_kotlinx_serialization_core")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$ver_coroutines_core")
implementation("io.ktor:ktor-client-core:$ver_ktor")
implementation("io.insert-koin:koin-core:$ver_koin")
}
}
val jsMain by getting {
dependencies {
implementation("org.jetbrains:kotlin-react:$ver_kotlin_react")
implementation("org.jetbrains:kotlin-styled:$ver_kotlin_styled")
implementation(npm("react-youtube-lite", "1.0.1"))
implementation(npm("react-share", "~4.2.1"))
// todo shouldn't be need but breaks build runtime/webpack
//implementation(npm("kotlinx-serialization-kotlinx-serialization-core-jslegacy", "1.4.2-RC1"))
implementation("com.ccfraser.muirwik:muirwik-components:0.7.0") {
exclude(group = "org.jetbrains.kotlin-wrappers", module = "kotlin-styled")
}
//<https://github.com/CookPete/react-player>
//implementation(npm("react-player", "2.9.0"))
}
//implementation("org.jetbrains.kotlinx:kotlinx-datetime-js:$ver_kotlinx_datetime")
}
versions are
ver_kotlin_react=17.0.1-pre.148-kotlin-1.4.21
ver_kotlin_styled=5.2.1-pre.146-kotlin-1.4.30
ver_react=17.0.1
ver_styled_cmp=5.3.0
ver_kotlin=1.4.32
the errors i get are:turansky
06/07/2021, 8:15 PMRobert Munro
06/08/2021, 6:33 AMimplementation("org.jetbrains.kotlin-wrappers:kotlin-react:$ver_kotlin_react")
implementation("org.jetbrains.kotlin-wrappers:kotlin-react-dom:$ver_kotlin_react")
implementation("org.jetbrains.kotlin-wrappers:kotlin-styled:$ver_kotlin_styled")
// implementation(npm("react-youtube-lite", "1.0.1"))
// implementation(npm("react-share", "~4.2.1"))
// todo shouldn't be need but breaks build runtime/webpack
//implementation(npm("kotlinx-serialization-kotlinx-serialization-core-jslegacy", "1.4.2-RC1"))
implementation("com.ccfraser.muirwik:muirwik-components:0.7.0") {
exclude(group = "org.jetbrains.kotlin-wrappers", module = "kotlin-styled")
}
versions
ver_kotlin_react=17.0.2-pre.208-kotlin-1.5.10
ver_kotlin_styled=5.3.0-pre.208-kotlin-1.5.10
ver_kotlin=1.5.10
but now have more legacy files missing?
> Task :kotlinNpmInstall
warning workspace-aggregator-0f273868-ebc7-43a8-b0bf-5e7f575cdc50 > Cuer-remote > ktor-ktor-http-cio-jsLegacy > text-encoding@0.7.0: no longer maintained
warning workspace-aggregator-0f273868-ebc7-43a8-b0bf-5e7f575cdc50 > Cuer-remote > ktor-ktor-client-core-jsLegacy > text-encoding@0.7.0: no longer maintained
warning workspace-aggregator-0f273868-ebc7-43a8-b0bf-5e7f575cdc50 > Cuer-remote > ktor-ktor-utils-jsLegacy > text-encoding@0.7.0: no longer maintained
warning workspace-aggregator-0f273868-ebc7-43a8-b0bf-5e7f575cdc50 > Cuer-remote > ktor-ktor-http-jsLegacy > text-encoding@0.7.0: no longer maintained
warning workspace-aggregator-0f273868-ebc7-43a8-b0bf-5e7f575cdc50 > Cuer-remote > ktor-ktor-io-jsLegacy > text-encoding@0.7.0: no longer maintained
warning workspace-aggregator-0f273868-ebc7-43a8-b0bf-5e7f575cdc50 > Cuer-remote > webpack-dev-server > sockjs > uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See <https://v8.dev/blog/math-random> for details.
warning "workspace-aggregator-0f273868-ebc7-43a8-b0bf-5e7f575cdc50 > Cuer-remote > muirwik-muirwik-components > @material-ui/core@4.11.4" has unmet peer dependency "react@^16.8.0 || ^17.0.0".
warning "workspace-aggregator-0f273868-ebc7-43a8-b0bf-5e7f575cdc50 > Cuer-remote > muirwik-muirwik-components > @material-ui/core@4.11.4" has unmet peer dependency "react-dom@^16.8.0 || ^17.0.0".
warning "workspace-aggregator-0f273868-ebc7-43a8-b0bf-5e7f575cdc50 > Cuer-remote > kotlin-styled > styled-components@5.3.0" has unmet peer dependency "react@>= 16.8.0".
warning "workspace-aggregator-0f273868-ebc7-43a8-b0bf-5e7f575cdc50 > Cuer-remote > kotlin-styled > styled-components@5.3.0" has unmet peer dependency "react-dom@>= 16.8.0".
warning "workspace-aggregator-0f273868-ebc7-43a8-b0bf-5e7f575cdc50 > Cuer-remote > kotlin-styled > styled-components@5.3.0" has unmet peer dependency "react-is@>= 16.8.0".
warning "workspace-aggregator-0f273868-ebc7-43a8-b0bf-5e7f575cdc50 > Cuer-remote > muirwik-muirwik-components > @material-ui/lab@4.0.0-alpha.56" has unmet peer dependency "react@^16.8.0".
warning "workspace-aggregator-0f273868-ebc7-43a8-b0bf-5e7f575cdc50 > Cuer-remote > muirwik-muirwik-components > @material-ui/lab@4.0.0-alpha.56" has unmet peer dependency "react-dom@^16.8.0".
warning "workspace-aggregator-0f273868-ebc7-43a8-b0bf-5e7f575cdc50 > Cuer-remote > kotlin-react-dom > react-dom@17.0.2" has unmet peer dependency "react@17.0.2".
warning "workspace-aggregator-0f273868-ebc7-43a8-b0bf-5e7f575cdc50 > Cuer-remote > muirwik-muirwik-components > @material-ui/core > @material-ui/styles@4.11.4" has unmet peer dependency "react@^16.8.0 || ^17.0.0".
warning "workspace-aggregator-0f273868-ebc7-43a8-b0bf-5e7f575cdc50 > Cuer-remote > muirwik-muirwik-components > @material-ui/core > @material-ui/styles@4.11.4" has unmet peer dependency "react-dom@^16.8.0 || ^17.0.0".
warning "workspace-aggregator-0f273868-ebc7-43a8-b0bf-5e7f575cdc50 > Cuer-remote > muirwik-muirwik-components > @material-ui/core > @material-ui/utils@4.11.2" has unmet peer dependency "react@^16.8.0 || ^17.0.0".
warning "workspace-aggregator-0f273868-ebc7-43a8-b0bf-5e7f575cdc50 > Cuer-remote > muirwik-muirwik-components > @material-ui/core > @material-ui/utils@4.11.2" has unmet peer dependency "react-dom@^16.8.0 || ^17.0.0".
warning "workspace-aggregator-0f273868-ebc7-43a8-b0bf-5e7f575cdc50 > Cuer-remote > muirwik-muirwik-components > @material-ui/core > @material-ui/system@4.11.3" has unmet peer dependency "react@^16.8.0 || ^17.0.0".
warning "workspace-aggregator-0f273868-ebc7-43a8-b0bf-5e7f575cdc50 > Cuer-remote > muirwik-muirwik-components > @material-ui/core > @material-ui/system@4.11.3" has unmet peer dependency "react-dom@^16.8.0 || ^17.0.0".
warning "workspace-aggregator-0f273868-ebc7-43a8-b0bf-5e7f575cdc50 > Cuer-remote > muirwik-muirwik-components > @material-ui/core > react-transition-group@4.4.2" has unmet peer dependency "react@>=16.6.0".
warning "workspace-aggregator-0f273868-ebc7-43a8-b0bf-5e7f575cdc50 > Cuer-remote > muirwik-muirwik-components > @material-ui/core > react-transition-group@4.4.2" has unmet peer dependency "react-dom@>=16.6.0".
errors are
Module not found: Error: Can't resolve 'kotlinx-serialization-kotlinx-serialization-core-jsLegacy' in '/Users/robmunro/repos/personal/cuer/cuer/build/js/packages/Cuer-remote/kotlin-dce-dev'
Module not found: Error: Can't resolve 'kotlin-wrappers-kotlin-extensions-js-legacy' in '/Users/robmunro/repos/personal/cuer/cuer/build/js/packages/Cuer-remote/kotlin-dce-dev'
Module not found: Error: Can't resolve 'kotlin-wrappers-kotlin-styled-js-legacy' in '/Users/robmunro/repos/personal/cuer/cuer/build/js/packages/Cuer-remote/kotlin-dce-dev'
Module not found: Error: Can't resolve 'kotlin-wrappers-kotlin-react-js-legacy' in '/Users/robmunro/repos/personal/cuer/cuer/build/js/packages/Cuer-remote/kotlin-dce-dev'
it looks from the npm warnings like react is downgraded?Robert Munro
06/08/2021, 7:01 AMver_react=17.0.2
ver_styled_cmp=5.3.0
implementation(npm("react", ver_react))
implementation(npm("react-dom", ver_react))
implementation(npm("react-is", ver_react))
implementation(npm("styled-components", ver_styled_cmp))
removes a lot of the npm install warnings but i still get the same missing js-legacy errorRobert Munro
06/08/2021, 7:49 AMkotlinx-serialization-kotlinx-serialization-core-js-legacy.js
(above error is *-jsLegacy
) which looks like this bug which was fixed last year so should be in the lastest serialization lib surely (1.2.1) https://youtrack.jetbrains.com/issue/KT-43237turansky
06/08/2021, 7:52 AMRobert Munro
06/08/2021, 8:10 AMjs(LEGACY)
so that looks to be what the dependency issue is for the *-[extensions,styled,react]-js-legacy
dependencies. So removing that lib removed all of them except the serialization-jsLegacy
issue.Robert Munro
06/08/2021, 9:00 AM