Closed
Description
What happens?
When I have the nodeIntegrationInWorker
flag enabled in electron, then when I go load/use duckdb-wasm, I get the following error:
TypeError: ic(...).dirname is not a function
at cdn.jsdelivr.net/npm/@duckdb/[email protected]/dist/duckdb-browser-eh.worker.js:10:59232
at Go.instantiateImpl (cdn.jsdelivr.net/npm/@duckdb/[email protected]/dist/duckdb-browser-eh.worker.js:11:25177)
at Go.instantiate (cdn.jsdelivr.net/npm/@duckdb/[email protected]/dist/duckdb-browser-eh.worker.js:11:15869)
at lc.instantiate (cdn.jsdelivr.net/npm/@duckdb/[email protected]/dist/duckdb-browser-eh.worker.js:24:10893)
at lc.onMessage (cdn.jsdelivr.net/npm/@duckdb/[email protected]/dist/duckdb-browser-eh.worker.js:10:53913)
at Qu.globalThis.onmessage (cdn.jsdelivr.net/npm/@duckdb/[email protected]/dist/duckdb-browser-eh.worker.js:24:10976)
If I disable the flag, then the library loads fine and seems to work fine, though I've not heavily tested the functionality beyond a simple query.
To Reproduce
See https://github.com/MasterOdin/electron-duckdb-wasm. Changing this line:
where if it's true
then will see the above error, and if it's false then the query runs and I get my result.
Browser/Environment:
Electron 26 (Chrome 116.0.5845.62), though have seen this for Electron 19 as well.
Device:
Macbook Pro
DuckDB-Wasm Version:
1.27.0
DuckDB-Wasm Deployment:
JS Delivr
Full Name:
Matthew Peveler
Affiliation:
PopSQL
Metadata
Metadata
Assignees
Labels
No labels