Version 4.4.0+ causes this runtime error: Uncaught ReferenceError: can't access lexical declaration 'Buffer' before initialization
See original GitHub issueMy application builds and runs fine with 4.3.0, but after upgrading to 4.4.0, I now receive this error in the javascript console:
Uncaught ReferenceError: can't access lexical declaration 'Buffer' before initialization
My app is written in Svelte using TypeScript and Vite (or Snowpack - they both fail with the same error) to build to the final deployable version.
Happy to provide as much detail as you think is valuable. If I’m doing something obviously wrong, please let me know.
Thanks for the library, btw - I really love using it with d3 for data transformation!
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
ReferenceError: can't access lexical declaration 'X' before ...
This happens within any block statement, when let or const variables are accessed before the line in which they are declared is executed....
Read more >Can't access lexical declaration`variable' before initialization
Error Type: ReferenceError. Cause of the error: Somewhere in the code, there is a lexical variable that was accessed before initialization.
Read more >ReferenceError: can't access lexical declaration`X' before ...
A variable defined by a LexicalBinding with an Initializer is assigned the value ... As said here, it cannot be accessed, hence the...
Read more >can't access lexical declaration`X' before initialization
This happens within any block statement, when let or const declarations are accessed before they are defined. Message. ReferenceError: Use before delaration ( ......
Read more >Error "ReferenceError: can't access lexical declaration `XXX ...
I think the reason for the error is that webpack generates code which tries to access const before it is declared: /* harmony...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Arrow 4.0.1 will fix this issue.
I’ve reverted to Apache Arrow v3.0.0 in v4.6.0. We can update the dependency once a fixed version of Arrow is released.