Skip to content

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

@yanjiew1

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions