Skip to content

punycode imports are broken in 2.0.0-beta #122

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

Open
MrOrz opened this issue May 18, 2025 · 0 comments · May be fixed by #123
Open

punycode imports are broken in 2.0.0-beta #122

MrOrz opened this issue May 18, 2025 · 0 comments · May be fixed by #123
Assignees
Labels
bug Something isn't working

Comments

@MrOrz
Copy link

MrOrz commented May 18, 2025

Version(s) affected: 2.0.0-beta.5

Description
whoiser 2 beta version is loading the deprecated Node.JS module punycode instead of the one in node_modules

How to reproduce

Image

This breaks things in non-node.js environments, such as Cloudflare's vitest pool workers.

Possible Solution

Follow the instruction in punycode.js to properly load the userland module

import punycode from 'punycode/';

After adding the trailing /, it's correctly pointing to the punycode in node_modules.
Image

Additional context

  • whoiser v1 does the import correctly. However I cannot use whoiser v1 because it depends on NodeJS https module, which Cloudflare worker environment does not support at all.
@MrOrz MrOrz added the bug Something isn't working label May 18, 2025
@MrOrz MrOrz linked a pull request May 18, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants