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

import with typescript #464

Closed
MaTiAtSIE opened this issue Feb 27, 2024 · 3 comments
Closed

import with typescript #464

MaTiAtSIE opened this issue Feb 27, 2024 · 3 comments

Comments

@MaTiAtSIE
Copy link

Hi,
I try to import parquet-wasm. However, it seems that the folder structure of the package does not match the README file. For instance the line

import * as parquet from 'parquet-wasm'

does not work as the compiler error says "Cannot find module 'parquet-wasm' or its corresponding type declarations" (tsc 4.9.5). I installed the package with

yarn add apache-arrow
yarn add parquet-wasm

After the installation, my typescript version was set to 4.5.5 and I manually reset the version to 4.9.5 by

The folder structure in {package_root}/node_modules/parquet-wasm is:

  • bundler
    -- parquet_wasm.d.ts
    -- parquet_wasm.js
    -- parquet_wasm_bg.js
    -- parquet_wasm_bg.wasm
    -- parquet_wasm_bg.wasm.ts
  • esm
    -- package.json
    -- parquet_wasm.d.ts
    -- parquet_wasm.js
    -- parquet_wasm_bg.wasm
    -- parquet_wasm_bg.wasm.ts
  • node
    -- package.json
    -- parquet_wasm.d.ts
    -- parquet_wasm.js
    -- parquet_wasm_bg.wasm
    -- parquet_wasm_bg.wasm.ts

So "parquet-wasm/bundler/arrow1" does not exist. What can be the problem?

@kylebarron
Copy link
Owner

does not work as the compiler error says "Cannot find module 'parquet-wasm' or its corresponding type declarations" (tsc 4.9.5).

Can you either pin to the most recent stable version (i.e. 0.5.0) or try out this branch: #414? As mentioned here, the arrow2 implementation is no longer supported.

@MaTiAtSIE
Copy link
Author

Thank you for the answer. Using the version 0.5.0 helped. I also had to enable 'asyncWebAssembly' in my webpack.config.js (webpack 5).
Now I have another runtime issue which is documented here.

@kylebarron
Copy link
Owner

This should be fixed in 0.6.0, which was just published

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants