Skip to content

cloudflare preset breaks unenv/fetch and node:http polyfills #364

@pi0

Description

@pi0

Environment

unenv v2 nightly with nodeless + cloudflare presets

Reproduction

https://github.com/unjs/unenv/blob/main/test/workerd/tests.mjs#L134

example usage

Describe the bug

A change in #363 causes node:http polyfill to use runtime native node:stream which is incompatible with unenv/fetch polyfills (which essentially breaks H3 v1 and Nitro v2 as soon as they use it anyhow, via upgrade or wrangler transpiling for node_compat_v2)

Additional context

This bug introduced as a hotfix for opennextjs/opennextjs-cloudflare#147 (usage in opennextjs)

This is solvable via #365 to support node:stream for node:http polyfill natively.

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions