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 · 2 comments
Open

Unable to load sqlite worker in webassembly #6683

bapaynter opened this issue Dec 12, 2024 · 2 comments
Labels

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.

Copy link

stale bot commented Dec 20, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed soon. Please update it or it may be closed to keep our repository organized. The best way is to add some more information or make a pull request with a test case. Also you might get help in fixing it at the RxDB Community Chat If you know you will continue working on this, just write any message to the issue (like "ping") to remove the stale tag.

@stale stale bot added the stale label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants