martmists
06/30/2023, 2:46 PM<module>.mjs
and <module>.uninstantiated.mjs
files.
The error I get is
index-public.js:32 Uncaught (in promise) Error: Cannot find module 'skia'
at index-public.js:32:11
at async _importModule (public.uninstantiated.mjs:14:1)
at async instantiate (public.uninstantiated.mjs:3894:1)
at async eval (public.mjs:3:16)
with code
<script type="application/javascript" src="static/js/skiko.js"></script>
<script type="application/javascript" src="static/js/index-public.js"></script>
Adam S
06/30/2023, 2:49 PMmartmists
06/30/2023, 2:51 PMbuild/compileSync/wasm/main/<typeExecutable/kotlin
. However, wasmExecutableDevelopmentCompileSync does not generate the .mjs files.Adam S
06/30/2023, 2:54 PMbuild/tmp
are there any .mjs files?martmists
06/30/2023, 2:56 PMbuild/js/packages/<module>/kotlin/<module>.mjs
. None in the temporary folders though.Adam S
06/30/2023, 2:57 PMtasks.configureEach {
val buildDir = project.layout.buildDirectory
doLast {
val mjsFiles = buildDir.get()
.asFileTree
.matching { include("**/*.mjs") }
.files
if (mjsFiles.isNotEmpty()) {
println("build dir contains .mjs files after task:$path ran")
}
}
}
and then running ./gradlew clean assemble
It adds an additional action to each task that will check the build dir after each task, and if an .mjs file suddenly exists then it will log the task path. So if you check the logs then it should narrow down the options.martmists
06/30/2023, 3:17 PMUncaught TypeError: Failed to resolve module specifier 'skia'
Adam S
06/30/2023, 3:17 PMmartmists
06/30/2023, 3:18 PMcompile<type>ExecutableKotlinWasm
, which does raise concerns on how to accomplish this with multiple wasm modules in the multiplatform project.martmists
06/30/2023, 3:20 PMAdam S
06/30/2023, 3:20 PMAdam S
06/30/2023, 3:23 PMsrc/jsMain/resources/index.html
.
The Gradle subproject has a path of :fca-components:fca-site
, but Kotlin only uses the name for the generated .js file https://youtrack.jetbrains.com/issue/KT-59700, so I import fca-site.js
.
There’s no fca-site.js
file in the build dir (apparently fca-site.js
is loaded from memory)martmists
06/30/2023, 3:57 PMAdam S
06/30/2023, 5:58 PMmartmists
06/30/2023, 6:08 PMAdam S
06/30/2023, 6:09 PMAdam S
06/30/2023, 6:11 PMAdam S
06/30/2023, 6:13 PMmartmists
07/02/2023, 10:14 AM