Skip to content

fetch() not working when node is running with --jitless flag set #4708

Closed as not planned

Description

@yanjiew1

Version

v25.2.1

Platform

Microsoft Windows NT 10.0.26200.0 x64

Subsystem

No response

What steps will reproduce the bug?

  1. Enter REPL by running node --jitless
  2. Type await fetch('https://www.google.com');, and press Enter.

How often does it reproduce? Is there a required condition?

There is no required condition. The issue can always be reproduced when node is running with --jitless flag.

What is the expected behavior? Why is that the expected behavior?

A response object should be returned.

What do you see instead?

fetch() failed because WebAssembly isn’t available. Node’s fetch() implementation (via undici) depends on WebAssembly, so it can’t run without it.

This is the error message.

Uncaught TypeError: fetch failed
    at node:internal/deps/undici/undici:15845:13
    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
    at async REPL1:1:33 {
  [cause]: ReferenceError: WebAssembly is not defined
      at lazyllhttp (node:internal/deps/undici/undici:6531:9)
      at connectH1 (node:internal/deps/undici/undici:7056:26)
      at node:internal/deps/undici/undici:8604:93
      at TLSSocket.<anonymous> (node:internal/deps/undici/undici:2939:13)
      at Object.onceWrapper (node:events:622:28)
      at TLSSocket.emit (node:events:508:28)
      at TLSSocket.emit (node:domain:552:15)
      at TLSSocket.onConnectSecure (node:internal/tls/wrap:1667:8)
      at TLSSocket.emit (node:events:508:28)
      at TLSSocket.emit (node:domain:552:15)

Additional information

No response

Activity

  1. transferred this issue fromnodejs/nodeon Dec 22, 2025
  2. mcollina commented on Dec 23, 2025

    @mcollina
    SponsorMember

    @yanjiew1 the HTTP parser used by fetch() is implemented in WebAssembly for ease of distribution. You can see the same parser used for Node.js core and Undici.

    What's your usecase?

    The main reason we use WebAssembly is maintenance convenience, as it allows us to not use any of the private APIs of Node.js and support all platforms without any additional binaries.

    This can be changed, but not without significant work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions