[
https://issues.apache.org/jira/browse/ARROW-12734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17342644#comment-17342644
]
Dominik Moritz edited comment on ARROW-12734 at 5/11/21, 3:15 PM:
------------------------------------------------------------------
Potential fix: https://github.com/apache/arrow/pull/10181.
was (Author: domoritz):
Related issue (potentially duplicate):
https://issues.apache.org/jira/browse/ARROW-12636. Potential fix:
https://github.com/apache/arrow/pull/10181.
> [JS] Arrow v4.0.0 breaks Snowpack builds
> ----------------------------------------
>
> Key: ARROW-12734
> URL: https://issues.apache.org/jira/browse/ARROW-12734
> Project: Apache Arrow
> Issue Type: Bug
> Components: JavaScript
> Affects Versions: 4.0.0
> Reporter: Jeffrey Heer
> Priority: Major
>
> Snowpack builds break as of Apache Arrow v4.0.0, with the following error:
> ReferenceError: Cannot access 'Buffer' before initialization
> at eval (eval at <anonymous>
> ([https://cdn.skypack.dev/-/[email protected]/dist=es2020,mode=imports/optimized/apache-arrow.js:6:17]),
> <anonymous>:1:1)
> at
> [https://cdn.skypack.dev/-/[email protected]/dist=es2020,mode=imports/optimized/apache-arrow.js:6:17]
> I believe this also breaks other bundlers that use hot module replacement,
> such as Vite ([https://github.com/vitejs/vite).]
> This appears to be caused by the following line of exported code, which makes
> potentially problematic use of "eval":
> {{const _Buffer = eval("typeof Buffer === 'function' ? Buffer : null");}}
> Note that Arrow version 3 works without incident. This error was reported by
> a user of the Arquero library
> ([https://github.com/uwdata/arquero/issues/166)] as it is breaking their
> build.
> To reproduce, load the following HTML:
>
> {{<!DOCTYPE html>}}
> {{<html lang="en">}}
> {{ <body>}}
> {{ <script type="module">}}
> {{ import * as Arrow from
> "https://cdn.skypack.dev/[email protected]";}}
> {{ console.log(Arrow);}}
> {{ </script>}}
> {{ </body>}}
> {{</html>}}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)