Closed kbatchu closed 2 months ago
esm\parquet_wasm
You should usually be using the bundler entry point with webpack.
Alternatively, if you're using the esm entry point, you need to await the default export. Your error is happening because you're not awaiting the wasm from the esm entry point.
I don't use webpack myself but there's an example template here: https://github.com/rustwasm/rust-webpack-template/blob/master/template/webpack.config.js
I made the existing text in the README bold: https://github.com/kylebarron/parquet-wasm/pull/487
I tried using - import * as Parquet from "parquet-wasm"; and Parquet.readParquet() but I am still getting the same error.
You're probably getting the esm import by default. In that case, you need to do
await Parquet.default();
Parquet.readParquet()
I think this issue is resolved, but feel free to comment again if not
I am getting an error message "Uncaught TypeError TypeError: Cannot read properties of undefined (reading '__wbindgen_add_to_stack_pointer') at readParquet (c:\PROJECTS\DataVizSandbox\DuckDBWasm\node_modules\parquet-wasm\esm\parquet_wasm.js:300:1).
I am using webpack 5.89.0. I get this same error message with both "parquet-wasm "^0.6.0-beta.2" and '"@geoarrow/geoparquet-wasm": "^0.2.0-beta.2".
Any idea on how to fix this?
Thanks