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

Fix: Fix module not working on Deno #23502

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sevenc-nanashi
Copy link

The written .mjs file does not work on Deno, so I fixed that.

  • Use node:module instead of module, so Deno can import that.
  • Added polyfill of Buffer.

@sbc100
Copy link
Collaborator

sbc100 commented Jan 27, 2025

We currently don't claim any deno support, but I suppose we could / should. I guess that means we should add at least some basic testing under deno.

Do you know if this incompatibility is likely to persist in deno or might they be looking to increase node comparability? Perhaps we could persuade them using this issue? :)

@kripken
Copy link
Member

kripken commented Jan 27, 2025

+1 for @sbc100 's hope that this can be fixed on the Deno side. But if that can't be done, or if we want something to work in the meantime, then I would recommend we look into the approach in #12203 , which I think will scale better if we want Deno, Bun, etc. etc. support. In that idea, each target, like Deno, would have a JS file to include which then patches things up for it. (If we can't literally patch in a polyfill manner, we could do something else, while keeping the goal of avoiding adding code for Deno in builds that don't need Deno.)

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

Successfully merging this pull request may close these issues.

3 participants