stacktracey icon indicating copy to clipboard operation
stacktracey copied to clipboard

Exception on stackTracey.clean()

Open pixeloution opened this issue 5 months ago • 0 comments

The issue seems like it will only affect Vite users and then only while using Vite's dev server:

When Stacktracey needs to load source maps via XHR - which then relies on, it seems, get-source which in turn relies on data-uri-to-buffer - it throws an exception due to "Buffer" not being defined.

I believe this is because the version of data-uri-to-buffer that get-source depends on is using only the Node-specific "Buffer" object. The current version relies on ArrayBuffer and Uint8Array which exist in the browser.

I've submitted a ticket on the get-source repo and while the repo hasn't been updated in a long while the developer seems active.

Meanwhile, if anyone else runs into this issue, it requires cloning get-source and updating, and then updating a forked version of StackTracey to use the updated get-source.

Finally: Thank you for this library in the first place. I've been using it a year or two now and love having it available.

pixeloution avatar Sep 06 '24 17:09 pixeloution