Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library not implements JS #213

Open
alekseyHunter opened this issue Nov 11, 2024 · 3 comments
Open

Library not implements JS #213

alekseyHunter opened this issue Nov 11, 2024 · 3 comments

Comments

@alekseyHunter
Copy link

Hello!

After adding next library:
implementation("com.russhwolf:multiplatform-settings-datastore:1.2.0")

I got the error:

Could not resolve all artifacts for configuration ':shared:jsCompileClasspath'.
> Could not resolve com.russhwolf:multiplatform-settings-datastore:1.2.0.
  Required by:
      project :shared
   > No matching variant of com.russhwolf:multiplatform-settings-datastore:1.2.0 was found. The consumer was configured to find a library for use during 'kotlin-api', preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.js.compiler' with value 'ir', attribute 'org.jetbrains.kotlin.platform.type' with value 'js' but:
       - Variant 'debugApiElements-published' declares a library for use during compile-time, preferably optimized for Android:
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
           - Other compatible attribute:
               - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
       - Variant 'debugRuntimeElements-published' declares a library for use during runtime, preferably optimized for Android:
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
           - Other compatible attribute:
               - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
       - Variant 'debugSourcesElements-published' declares a component for use during runtime, preferably optimized for Android:
           - Incompatible because this component declares documentation, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a library, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
           - Other compatible attribute:
               - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
       - Variant 'iosArm64ApiElements-published' declares a library for use during 'kotlin-api', preferably optimized for non-jvm:
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
           - Other compatible attribute:
               - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
       - Variant 'iosArm64MetadataElements-published' declares a library, preferably optimized for non-jvm:
           - Incompatible because this component declares a component for use during 'kotlin-metadata', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
           - Other compatible attribute:
               - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
       - Variant 'iosArm64SourcesElements-published' declares a component, preferably optimized for non-jvm:
           - Incompatible because this component declares documentation for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a library for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
           - Other compatible attribute:
               - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
       - Variant 'iosSimulatorArm64ApiElements-published' declares a library for use during 'kotlin-api', preferably optimized for non-jvm:
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
           - Other compatible attribute:
               - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
       - Variant 'iosSimulatorArm64MetadataElements-published' declares a library, preferably optimized for non-jvm:
           - Incompatible because this component declares a component for use during 'kotlin-metadata', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
           - Other compatible attribute:
               - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
       - Variant 'iosSimulatorArm64SourcesElements-published' declares a component, preferably optimized for non-jvm:
           - Incompatible because this component declares documentation for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a library for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
           - Other compatible attribute:
               - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
       - Variant 'iosX64ApiElements-published' declares a library for use during 'kotlin-api', preferably optimized for non-jvm:
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
           - Other compatible attribute:
               - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
       - Variant 'iosX64MetadataElements-published' declares a library, preferably optimized for non-jvm:
           - Incompatible because this component declares a component for use during 'kotlin-metadata', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
           - Other compatible attribute:
               - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
       - Variant 'iosX64SourcesElements-published' declares a component, preferably optimized for non-jvm:
           - Incompatible because this component declares documentation for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a library for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
           - Other compatible attribute:
               - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
       - Variant 'jvmApiElements-published' declares a library for use during compile-time, preferably optimized for standard JVMs:
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
           - Other compatible attribute:
               - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
       - Variant 'jvmRuntimeElements-published' declares a library for use during runtime, preferably optimized for standard JVMs:
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
           - Other compatible attribute:
               - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
       - Variant 'jvmSourcesElements-published' declares a component for use during runtime, preferably optimized for standard JVMs:
           - Incompatible because this component declares documentation, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a library, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
           - Other compatible attribute:
               - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
       - Variant 'linuxX64ApiElements-published' declares a library for use during 'kotlin-api', preferably optimized for non-jvm:
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
           - Other compatible attribute:
               - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
       - Variant 'linuxX64SourcesElements-published' declares a component, preferably optimized for non-jvm:
           - Incompatible because this component declares documentation for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a library for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
           - Other compatible attribute:
               - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
       - Variant 'macosArm64ApiElements-published' declares a library for use during 'kotlin-api', preferably optimized for non-jvm:
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
           - Other compatible attribute:
               - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
       - Variant 'macosArm64MetadataElements-published' declares a library, preferably optimized for non-jvm:
           - Incompatible because this component declares a component for use during 'kotlin-metadata', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
           - Other compatible attribute:
               - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
       - Variant 'macosArm64SourcesElements-published' declares a component, preferably optimized for non-jvm:
           - Incompatible because this component declares documentation for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a library for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
           - Other compatible attribute:
               - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
       - Variant 'macosX64ApiElements-published' declares a library for use during 'kotlin-api', preferably optimized for non-jvm:
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
           - Other compatible attribute:
               - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
       - Variant 'macosX64MetadataElements-published' declares a library, preferably optimized for non-jvm:
           - Incompatible because this component declares a component for use during 'kotlin-metadata', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
           - Other compatible attribute:
               - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
       - Variant 'macosX64SourcesElements-published' declares a component, preferably optimized for non-jvm:
           - Incompatible because this component declares documentation for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a library for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
           - Other compatible attribute:
               - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
       - Variant 'metadataApiElements' declares a library, preferably optimized for non-jvm:
           - Incompatible because this component declares a component for use during 'kotlin-metadata', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'common' and the consumer needed a component for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
           - Other compatible attribute:
               - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
       - Variant 'metadataSourcesElements' declares a component, preferably optimized for non-jvm:
           - Incompatible because this component declares documentation for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'common' and the consumer needed a library for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
           - Other compatible attribute:
               - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
       - Variant 'releaseApiElements-published' declares a library for use during compile-time, preferably optimized for Android:
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
           - Other compatible attribute:
               - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
       - Variant 'releaseRuntimeElements-published' declares a library for use during runtime, preferably optimized for Android:
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
           - Other compatible attribute:
               - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
       - Variant 'releaseSourcesElements-published' declares a component for use during runtime, preferably optimized for Android:
           - Incompatible because this component declares documentation, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a library, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
           - Other compatible attribute:
               - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
@russhwolf
Copy link
Owner

Datastore is not available in js

@alekseyHunter
Copy link
Author

@russhwolf, the documentation talks other ;)
image

@russhwolf
Copy link
Owner

That's not datastore. You can use multiplatform-settings-coroutines from JS but not multiplatform-settings-datastore. The point of that part of the docs is to demonstrate how you can use SuspendSettings from common code when you're using DataStore on Android (or other Datastore platforms, of which JS is not one)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants