You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "nrabinowitz (via GitHub)" <gi...@apache.org> on 2025/05/26 22:40:55 UTC
[I] [JS] The package.json file incorrectly specifies sideEffects: false [arrow-js]
nrabinowitz opened a new issue, #73:
URL: https://github.com/apache/arrow-js/issues/73
### Describe the bug, including details regarding any error messages, version, and platform.
**Problem**
When building a Node application with Webpack, calls to `RecordBatchStreamWriter.toNodeStream` fail with the error:
```
Error: "toNodeStream" not available in this environment
```
**Cause**
The `apache-arrow` package.json file [specifies `"sideEffects": false`](https://github.com/apache/arrow/blob/apache-arrow-13.0.0/js/gulp/package-task.js#L69), but the Node overrides required for streaming Arrow files are [applied as a side effect](https://github.com/apache/arrow/blob/apache-arrow-13.0.0/js/src/Arrow.node.ts#L27). I believe this is true for the [DOM overrides as well](https://github.com/apache/arrow/blob/apache-arrow-13.0.0/js/src/Arrow.dom.ts#L27).
**Suggested Fix**
I haven't tested this, but I think that wrapping the overrides in these two files in an IIFE [as is done here](https://github.com/apache/arrow/blob/143b475f94dad840be2eb109ff27f3181791ad9f/js/src/table.ts#L380) will fix this issue in the Webpack build.
### Component(s)
JavaScript
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org