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

Is it possible to use with Deno? #1267

Closed
al6x opened this issue Apr 12, 2021 · 5 comments
Closed

Is it possible to use with Deno? #1267

al6x opened this issue Apr 12, 2021 · 5 comments
Assignees

Comments

@al6x
Copy link

al6x commented Apr 12, 2021

No description provided.

@josephrocca
Copy link

Relevant: denoland/deno#10105

@YoDaMa
Copy link
Contributor

YoDaMa commented Sep 29, 2021

quoting from the deno discussion:

I'm guessing this is because MQTT.js contains a browserified version of Node.js's Buffer, and that package tries to change prototypes using proto. This doesn't work because, unlike browsers, Deno doesn't allow proto to be overwritten (relevant issue). One way to fix this (as mentioned here) is to replace all instances of obj.proto = newPrototype with Object.setPrototypeOf(obj, newPrototype).

But actually, it looks like the latest version of browserify's Buffer uses setPrototypeOf instead of proto, so you may just be able to ask the maintainer of https://github.com/mqttjs/MQTT.js to re-browserify the package and publish a new version.

So essentially we should work on re-releasing the browserified package. This should be easy enough. @al6x or @vishnureddy17 do you want to take a stab at it? Just send a PR with the update browserify package.

@YoDaMa YoDaMa self-assigned this Sep 29, 2021
@vishnureddy17
Copy link
Member

I should be able to take a stab at it some time mid-week, I'll assign the issue to myself once I get started on it. @al6x , feel free to pick this one up if I haven't started.

@vishnureddy17
Copy link
Member

vishnureddy17 commented Oct 4, 2021

Hmm, it actually looks like the most recent version of browserify still hasn't updated the dependency on buffer. So it wouldn't be a matter of simply re-browserifying.

Relevant Browserify Issue
Relevant Browserify Pull Request

@vishnureddy17
Copy link
Member

vishnureddy17 commented Oct 5, 2021

Gonna close this, as MQTT.js won't be able to get to Deno support right now given the current situation with Browserify.

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

4 participants