Version
v18.6.0
Platform
Darwin Asias-MacBook-Air.local 20.6.0 Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:27 PDT 2021; root:xnu-7195.141.2~5/RELEASE_ARM64_T8101 arm64
Subsystem
No response
What steps will reproduce the bug?
Hey :)
I've upgraded node to 18.6.0 and started receiving following typescript error (I work on the latest typescript version 4.7.4:
TypeError: The "source" argument must be an instance of Response or an Promise resolving to Response. Received an instance of Response
Error occurs when calling wasm method:
await WebAssembly.compileStreaming(wasmResponse);
API:
function WebAssembly.compileStreaming(source: Response | PromiseLike<Response>): Promise<WebAssembly.Module>
This is how I generate the response:
function generateResponse(wasmBinary: Buffer): Response {
const init = { status: 200, statusText: 'OK', headers: { 'Content-Type': 'application/wasm' } };
return new Response(wasmBinary, init);
}
It was working fine under node v16.5.0. I assume it may have sth to do with undici providing default fetch to node?
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
No response
What do you see instead?
TypeError: The "source" argument must be an instance of Response or an Promise resolving to Response. Received an instance of Response
Additional information
No response
Version
v18.6.0
Platform
Darwin Asias-MacBook-Air.local 20.6.0 Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:27 PDT 2021; root:xnu-7195.141.2~5/RELEASE_ARM64_T8101 arm64
Subsystem
No response
What steps will reproduce the bug?
Hey :)
I've upgraded node to 18.6.0 and started receiving following typescript error (I work on the latest typescript version 4.7.4:
Error occurs when calling wasm method:
API:
This is how I generate the response:
It was working fine under node v16.5.0. I assume it may have sth to do with undici providing default fetch to node?
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
No response
What do you see instead?
Additional information
No response