Yassine Abou
06/10/2025, 9:45 PM{
"message":"Uncaught SyntaxError: Unexpected token '<'",
"type":"error"
} isTrusted,true
kotlinx.coroutines.error_$external_fun @ composeApp.uninstantiated.mjs:189
Is this primarily a
SQLDelight configuration issue or a coroutines uncaught
exception?
Relevant Code Snippets:
Database Configuration:
private val workerScriptUrl: String =
js("""new URL("@cashapp/sqldelight-sqljs-worker/sqljs.worker.js", import.meta.url)""")
actual val platformModule = module {
single {
val driver = WebWorkerDriver(Worker(workerScriptUrl)).apply {
enableForeignKeys()
}
LlmsDatabaseWrapper(driver, LlmsDatabase(driver))
}
}
Webpack Configuration (sqljs.js)
config.resolve = {
fallback: {
fs: false,
path: false,
crypto: false,
}
};
const CopyWebpackPlugin = require('copy-webpack-plugin');
config.plugins.push(
new CopyWebpackPlugin({
patterns: [
'../../node_modules/sql.js/dist/sql-wasm.wasm'
]
})
);
for more context. check out this repository link: https://github.com/yassineAbou/LLMS