gullerya / object-observer

Object Observer functionality of JavaScript objects/arrays via native Proxy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ReferenceError: Blob is not defined

xeroxstar opened this issue · comments

I am using this module most of my time on the server side, i guess there was an update to this module and i started to getting new errors, here is one of them:

} else if (target instanceof Date || target instanceof Blob || target instanceof Error) {
		                                                       ^

ReferenceError: Blob is not defined

The blob class is not part of the nodejs so the module throwing the error.
To fix it i installed cross-blob package to make it work in nodejs. I hope it will help to someone!

commented

It helped indeed. Just wondering if there is only two of us encountered the problem in a year and a half. Should not the issue be opened? For me it seems like the object-observer just won't work out of the box on node without the mentioned package

@K0nfy && @xeroxstar this issue indeed was not something raised along, I presume due to the fact that object-observer is mostly used in the Web runtimes rather then NodeJS.
I see that Blob as an object was already added to NodeJS around 14/15, but is still requires an import, so still not on par with Web API.
I'm reopening this issue to not fail NodeJS on this. Will hopefully resolve it today. Track this item please.

The issue is resolved as part of v4.5.0.

commented

Cool