-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[JS] Compatibility Issue with Apache Arrow Library in Angular Application #39970
Comments
Facing the same issue in our client integration as well. Looks like the arrow package import pulls in some node types that pollute the globals for browser projects. Any guidance on how to resolve this issue? |
try to replace @types/node with @types/web by running: |
Can you provide a specific (minimal) reproduction? Also, make sure your bundler pulls in |
@domoritz, @trxcllnt - I did try importing specific classes from I finally had some time to create a minimal repro for this typing issue. I've created the repo apache-arrow-angular-type-issue-repro to illustrate this issue. I simply used the angular cli tool to scaffold a very simple angular web app. The main changes to repro the issue can be found in app.component.ts. Here are the repro steps:
You'll start seeing build errors of this type as soon as you uncomment the import line for the apache-arrow package: If you uncomment that line, the ng serve automatically picks up changes and builds without any errors. I think the Hope this helps clarify and debug the issue I shared earlier. |
Hmm, can you set the type to |
@domoritz , thanks for taking a look. Yes, I shared the minimal repro just as an illustration and I imagine that the re typing as you suggested should work for the minimal repro case. However, in our production code base there are 100s of errors related to the typing mismatch and it might not be feasible to refactor all the errors. It's most evident in the |
It's odd that you get conflicts with node types. I don't really get yet why. However, to your question whether you can not pull them in that would be something your bundler does. It's not something I can make time to debug for you, though. |
This is not an issue of bundling, the problem is with TypeScript compilation. I believe the root cause is probably the use of NodeJS types in Line 21 in 2ae192b
Arrow.dom.ts module. In my view the correct fix is for the apache-arrow project to make sure that the Arrow.dom module does not have any imports to NodeJS code, including types. Importing any module that imports these types will pollute the TypeScript type context since NodeJS declares ambient types that conflict with browser types.
|
We should be able to remove the node types with a bit of duck-typing. |
Describe the bug, including details regarding any error messages, version, and platform.
We are encountering an issue related to the compatibility of the Apache Arrow library version (14.0.2) with our Angular application (version 16.2.0) running on Node.js version 18.16.0. During the application build process, we are utilizing setTimeout in multiple places, resulting in errors indicating "Type 'timeout' is not assignable to type 'number'." We need assistance in resolving this issue or guidance on obtaining a compatible version of the Apache Arrow library that supports the specified Angular and Node.js versions.
Component(s)
JavaScript
The text was updated successfully, but these errors were encountered: