Closed lthamm closed 4 months ago
Ok dont be stupid, actually copy the file to public/assets/sql-wasm.wasm
and not the js file public/assets/sql-wasm.js
.
@lthamm make sure that you have copied on the public/assets folder the sql-wasm.wasm from the node-modules/sql.js/dist
Thanks for getting back so fast! I noticed a few minutes before you replied and closed the issue. Sorry for wasting everyones time but maybe someone else can learn from that mistake. If you take that into account, it works very well.
I just cant seem to get this setup running - neither when I clone your app nor when I set it up from scratch with the latest version created from the ionic cli.
The error i consistently stumble upon is at
main.ts:80
when runningawait connection.initialize();
:main.ts:80 wasm streaming compile failed: TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'. await in createDatabaseConnection (async
Full error:
http://localhost:8100/tabs/tab1 So it seems like the way ionic server the app, the MIME type is not correctly recognized, but I have no clue how I would fix this. For reference I am on node 20 and ionic toolchain builds the app with vite.