You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fetch() not working when node is running with --jitless flag set #4708
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)
@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.
Activity
mcollina commentedon Dec 23, 2025
@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.