Open seeya opened 2 months ago
Initializing duckdb_blocking throws an undefined (reading 'mainModule') error.
To resolve it, I had to do this.
let db = await duckdb_blocking.createDuckDB( **{ eh: DUCKDB_BUNDLES },** logger, duckdb_blocking.BROWSER_RUNTIME );
The issue should stem from here where it checks if the bundles.eh exists. https://github.com/duckdb/duckdb-wasm/blob/b4d2182e70b3bbf9f7cc5ac7f7d45fa94396adeb/packages/duckdb-wasm/src/targets/duckdb-browser-blocking.ts#L23
bundles.eh
I created a sandbox here: https://codesandbox.io/p/sandbox/bold-goldwasser-cgzhvv
import * as duckdb from "@duckdb/duckdb-wasm"; import * as duckdb_blocking from "@duckdb/duckdb-wasm/blocking"; async function instantiate(duckdb) { const JSDELIVR_BUNDLES = duckdb.getJsDelivrBundles(); const DUCKDB_BUNDLES = await duckdb.selectBundle(JSDELIVR_BUNDLES); const logger = new duckdb_blocking.VoidLogger(); let db = await duckdb_blocking.createDuckDB( **DUCKDB_BUNDLES**, logger, duckdb_blocking.BROWSER_RUNTIME ); await db.instantiate((_) => {}); return db; }
Chrome
macOS
1.28.0
browser
seeya
None
What happens?
Initializing duckdb_blocking throws an undefined (reading 'mainModule') error.
To resolve it, I had to do this.
The issue should stem from here where it checks if the
bundles.eh
exists. https://github.com/duckdb/duckdb-wasm/blob/b4d2182e70b3bbf9f7cc5ac7f7d45fa94396adeb/packages/duckdb-wasm/src/targets/duckdb-browser-blocking.ts#L23To Reproduce
I created a sandbox here: https://codesandbox.io/p/sandbox/bold-goldwasser-cgzhvv
Browser/Environment:
Chrome
Device:
macOS
DuckDB-Wasm Version:
1.28.0
DuckDB-Wasm Deployment:
browser
Full Name:
seeya
Affiliation:
None