nrabinowitz opened a new issue, #38936:
URL: https://github.com/apache/arrow/issues/38936

   ### 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-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to