Version
v25.0.0 (also reproduced in v24.9.0)
Platform
Darwin Kernel Version 24.6.0: Mon Aug 11 21:16:52 PDT 2025; root:xnu-11417.140.69.701.11~1/RELEASE_ARM64_T8112 arm64
Subsystem
node:readline/promises
What steps will reproduce the bug?
Place this in test.js:
import { stdin, stdout } from "node:process";
import { createInterface } from "node:readline/promises";
const rl = createInterface({ input: stdin, output: stdout });
const answer = await rl.question("hi\n");
console.log(answer);
and run it with:
the above is important. node test.js works fine.
How often does it reproduce? Is there a required condition?
Always.
What is the expected behavior? Why is that the expected behavior?
Program does not terminate.
What do you see instead?
Program terminates with exit code 13 and prints:
hi
Warning: Detected unsettled top-level await at file:///Users/me/test/[eval1]:5
const answer = await rl.question("hi");
Additional information
This seems related, but in my case I don't hit Ctrl-C: #53497
Version
v25.0.0 (also reproduced in v24.9.0)
Platform
Subsystem
node:readline/promises
What steps will reproduce the bug?
Place this in
test.js:and run it with:
the above is important.
node test.jsworks fine.How often does it reproduce? Is there a required condition?
Always.
What is the expected behavior? Why is that the expected behavior?
Program does not terminate.
What do you see instead?
Program terminates with exit code 13 and prints:
Additional information
This seems related, but in my case I don't hit Ctrl-C: #53497