Skip to content

punycode imports are broken in 2.0.0-beta #122

@MrOrz

Description

@MrOrz

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions