Version: Deno 2.7.12
Hi,
I would like to report a behavior in Deno that can be reproduced using the below snippet:
const { createHash } = require("node:crypto");
const { Readable, pipeline } = require("node:stream");
const input = Readable.from(["hello"]);
const hash = createHash("sha256");
pipeline(input, hash, (err) => {
if (err) {
console.error("pipeline error:", err);
process.exit(1);
}
// Works in Node, throws in Deno
const digest = hash.digest("hex");
console.log("digest:", digest);
});
Expected output
root@KContainer:~/7706# node a.cjs
digest: 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
Actual output
root@KContainer:~/7706# deno run -A a.cjs
error: Uncaught Error: Digest already called
const digest = hash.digest("hex");
^
at Hash.digest (ext:deno_node/internal/crypto/hash.ts:90:32)
at file:///home/c01kele/git/run/cerebras/bun/OPENAI/gpt5.1/filter/batch_1/cross_runtime/temp_deno/7706/a.cjs:15:23
at ext:deno_node/internal/util.mjs:48:5
at processTicksAndRejections (ext:core/01_core.js:373:17)
at drainTicks (ext:core/01_core.js:427:5)
Version: Deno 2.7.12
Hi,
I would like to report a behavior in Deno that can be reproduced using the below snippet:
Expected output
Actual output