sockjs / sockjs-client

WebSocket emulation - Javascript client
MIT License
8.43k stars 1.3k forks source link

global is not defined #581

Closed VladislavLobakh closed 2 years ago

VladislavLobakh commented 2 years ago

Hello everyone!

There's an issue with sockjs that already existed for years.

Error: Uncaught (in promise): ReferenceError: global is not defined
ReferenceError: global is not defined

It was opened before https://github.com/sockjs/sockjs-client/issues/439 but wasn't fixed. I know the hotfix to add (window as any).global = window; into polyfills.

But is it going to be fixed?

brycekahle commented 2 years ago

It isn't an issue, because if you use the pre-bundled files, it works fine. If you are bundling yourself, then you need to take care of it yourself.

brycekahle commented 2 years ago

Please don't open new issues for existing issues.