Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong setup when run in electron main process #1671

Closed
stephanbruny opened this issue Aug 16, 2023 · 3 comments
Closed

Wrong setup when run in electron main process #1671

stephanbruny opened this issue Aug 16, 2023 · 3 comments

Comments

@stephanbruny
Copy link

MQTT.js tries to use WebSockets when run in the main process of electron resulting in Error: 'WebSocket is not defined'.

The is-browser module tries to identify running in browser by checking webpack_require to be function, which it is, as the main process is bundled by WebPack.
Nevertheless, it is not a browser process.

I suggest changing or dropping the legacy-check in that module, or at least, drop the web pack check.

@stephanbruny
Copy link
Author

Thank you very much @robertsLando !
That was quick

@robertsLando
Copy link
Member

you welcome

@robertsLando
Copy link
Member

I have a feel the change broke something: #1672 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants