xpl / ololog

A better console.log for the log-driven debugging junkies
https://www.npmjs.com/package/ololog
The Unlicense
215 stars 8 forks source link

ReferenceError: Buffer is not defined #32

Open Visual-Dawg opened 2 years ago

Visual-Dawg commented 2 years ago

I am building an app with Electron and Ololog does not work in my front-end. I get the following error:

index.js:60 Uncaught (in promise) ReferenceError: Buffer is not defined
    at dataUriToBuffer (index.js:60:16)
    at SourceMapResolver (get-source.js:84:61)
    at SourceMapResolverFromFetchedFile (get-source.js:77:22)
    at _resolve (get-source.js:37:59)
    at Object.resolve (get-source.js:44:36)
    at StackTracey.withSource (stacktracey.js:186:55)
    at stacktracey.js:234:36
    at Array.map (<anonymous>)
    at StackTracey.<computed> [as map] (stacktracey.js:332:52)
    at StackTracey.withSources (stacktracey.js:234:21)

I am using Vite and Svelte, however when I tried to reproduce it with just those two frameworks (without Electron), it works just fine. I think that it might not execute the Browser version for whatever reason. Is it possible to enforce that?