You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using following multiplatform configuration for wasm target
wasmJs {
binaries.executable()
nodejs()
}
trying to add nodefilesystem dep
sourceSets {
val wasmJsMain by getting {
dependencies {
implementation("com.squareup.okio:okio-nodefilesystem:3.9.0")
}
}
}
But getting following error
Could not determine the dependencies of task ':kotlinNpmInstall'.
> Could not resolve all dependencies for configuration ':llama2:wasmJsNpmAggregated'.
> Could not resolve com.squareup.okio:okio-nodefilesystem:3.9.0.
Required by:
project :llama2
> No matching variant of com.squareup.okio:okio-nodefilesystem:3.9.0 was found. The consumer was configured to find a library for use during 'kotlin-runtime', preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm', attribute 'org.jetbrains.kotlin.js.public.package.json' with value 'public-package-json', attribute 'org.jetbrains.kotlin.wasm.target' with value 'js' but:
- Variant 'commonFakeApiElements-published' capability com.squareup.okio:okio-nodefilesystem:3.9.0:
- Incompatible because this component declares a component for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'common' and the consumer needed a component for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
- Other compatible attributes:
- Doesn't say anything about its component category (required a library)
- Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
- Doesn't say anything about org.jetbrains.kotlin.js.public.package.json (required 'public-package-json')
- Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
- Variant 'jsApiElements-published' capability com.squareup.okio:okio-nodefilesystem:3.9.0 declares a library:
- Incompatible because this component declares a component for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js' and the consumer needed a component for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
- Other compatible attributes:
- Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
- Doesn't say anything about org.jetbrains.kotlin.js.public.package.json (required 'public-package-json')
- Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
- Variant 'jsRuntimeElements-published' capability com.squareup.okio:okio-nodefilesystem:3.9.0 declares a library for use during 'kotlin-runtime':
- Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
- Other compatible attributes:
- Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
- Doesn't say anything about org.jetbrains.kotlin.js.public.package.json (required 'public-package-json')
- Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
- Variant 'jsSourcesElements-published' capability com.squareup.okio:okio-nodefilesystem:3.9.0 declares a component for use during 'kotlin-runtime':
- Incompatible because this component declares documentation, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js' and the consumer needed a library, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
- Other compatible attributes:
- Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
- Doesn't say anything about org.jetbrains.kotlin.js.public.package.json (required 'public-package-json')
- Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
Which kind of makes sense.
Is there any option for wasmJs to read from real fs the same way it works for js targets?
The text was updated successfully, but these errors were encountered:
Or if you're in a browser you have to use the JS file system API directly and can't use Okio: https://developer.mozilla.org/en-US/docs/Web/API/File_System_API. In that case you can wrap your file system interactions in a higher-level suspending interface and switch between Okio and native JS implementations.
I'm using following multiplatform configuration for wasm target
trying to add nodefilesystem dep
But getting following error
Which kind of makes sense.
Is there any option for wasmJs to read from real fs the same way it works for js targets?
The text was updated successfully, but these errors were encountered: