Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to load sqlite worker in webassembly #6683

Open
bapaynter opened this issue Dec 12, 2024 · 1 comment
Open

Unable to load sqlite worker in webassembly #6683

bapaynter opened this issue Dec 12, 2024 · 1 comment

Comments

@bapaynter
Copy link

image

I'm receiving this error when trying to use the sqlite storage backend. I'm using the example sqlite code (with fixes) -

import SQLiteESMFactory from 'wa-sqlite/dist/wa-sqlite-async.mjs';
import * as SQLite from 'wa-sqlite';
const sqliteModule = await SQLiteESMFactory();
const sqlite3 = SQLite.Factory(sqliteModule);

const rxdb = await createRxDatabase({
    name: 'task_list',
    storage: getRxStorageSQLite({
        sqliteBasics: getSQLiteBasicsWasm(sqlite3)
    })
});

My project is vitejs + vue3.

@pubkey
Copy link
Owner

pubkey commented Dec 13, 2024

You have to serve the wasm file at the correct position from your webserver with the correct mime type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants