TypeError("Received non-Uint8Array chunk") on readable web stream #632
-
|
Here's a minimal reproducible example https://github.com/tai2/zip.js-unzip-test zip.js raises a runtime error when feeding Node's readable web streams. Node.js v22.13.1 |
Beta Was this translation helpful? Give feedback.
Answered by
gildas-lormeau
Jan 13, 2026
Replies: 2 comments
-
|
It looks like it's a bug in Node.js unfortunately. I can reproduce it with the code below which does not depend on zip.js. import * as fs from "fs/promises";
const main = async () => {
const filepath = "file.zip";
const file = await fs.open(filepath);
const readableStream = file.readableWebStream();
const blob = await new Response(readableStream).blob();
};
await main(); |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
It also looks like it's fixed in Node.js 24, see nodejs/node#54041. The same code runs fine in Node.js v24.12.0. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
gildas-lormeau
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It also looks like it's fixed in Node.js 24, see nodejs/node#54041. The same code runs fine in Node.js v24.12.0.