electric-sql / electric-sql/pglite
Improve error with pointer to docs when PGlite is unable to load WASM binary
Open
bundlers-nextjs/emsdk
- Dominant language
- TypeScript
- Stars
- 16k
- Forks
- 442
- Avg merge
- 20h 19m
- Merged PRs (30d)
- 7
Description
I'm getting an error when running a transaction in the browser. The function I'm running:
```ts
export const replaceSchema = (db: PGlite, schemaStr: SchemaString) => {
return db.transaction((tx) => {
tx.exec(`DROP SCHEMA public CASCADE;`);
return tx.exec(schemaStr);
});
};
```
The error:
```
Uncaught (in promise) RuntimeError: Aborted(CompileError: WebAssembly.instantiate(): expected magic word 00 61 73 6d, found 3c 21 64 6f @+0). Build with -sASSERTIONS for more info.
at abort (@electric-sql_pglite.js?v=74e038dd:461:
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.