https://kotlinlang.org logo
#compose-web
Title
# compose-web
r

rebok

02/25/2024, 9:33 PM
When i try to run an empty website using js canvas i get:
Copy code
caught TypeError: org_jetbrains_skia_Paint__1nMake is not a function
    at Module.org_jetbrains_skia_Paint__1nMake (skiko.js:1:176470)
    at Paint_init_$Init$_0 (Paint.kt:25:27)
    at Paint_init_$Create$_0 (skiko-kjs.js:9594:12)
    at new SkiaBackedPaint (SkiaBackedPaint.skiko.kt:33:61)
    at Paint_0 (SkiaBackedPaint.skiko.kt:25:29)
    at new Companion_17 (Standard.kt:158:3775)
    at Companion_getInstance_41 (compose-multiplatform-core-compose-ui-ui.js:22588:7)
    at new InnerNodeCoordinator (InnerNodeCoordinator.kt:56:1)
    at new NodeChain (NodeChain.kt:36:37)
    at new LayoutNode (LayoutNode.kt:780:26)
d

Dima Avdeev

02/26/2024, 8:54 AM
Hello! Are you tried to use wizard to create a project? https://kmp.jetbrains.com/
r

rebok

02/26/2024, 8:55 AM
Firstly it was a wasm project generated by it, and then I changed it to js() and jsMain sourcesets
d

Dima Avdeev

02/26/2024, 9:40 AM
So, maybe the problem is is sourceSet's configuration
Please pay attention to this section in Kotlin documentation
r

rebok

02/26/2024, 2:52 PM
it turned out to be a problem with missing
defer
no, It still doesn't work. It works for the first time, but after that it stops to do so: *the same error
looks like the problem is with caching, when i close the site, remove chrome cache, and open the site again i get this error *i'm using the jsBrowserDevelopmentRun task as a web server
problem solved, i forgot to put my app inside of wasmReady { ... }
👍 1
11 Views