
Research
Node.js Fixes AsyncLocalStorage Crash Bug That Could Take Down Production Servers
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.
For reading user input from stdin.
Similar to the readline builtin's question() method, but with a
few more features.
const { read } = require('read')
// or with ESM: import { read } from 'read'
try {
const result = await read(options)
} catch (er) {
console.error(er)
}
Every option is optional.
prompt What to write to stdout before reading input.silent Don't echo the output as the user types it.replace Replace silenced characters with the supplied character value.timeout Number of ms to wait for user input before giving up.default The default value if the user enters nothing.edit Allow the user to edit the default value.terminal Treat the output as a TTY, whether it is or not.input Readable stream to get input data from. (default process.stdin)output Writable stream to write prompts to. (default: process.stdout)completer Autocomplete callback (see official api for detailshistory History array, which will be appended to.If silent is true, and the input is a TTY, then read will set raw mode, and read character by character.
Patches welcome.
The 'prompt' package is a more feature-rich alternative to 'read'. It supports validation, default values, and complex prompts with multiple fields. It is more suitable for applications that require more sophisticated user input handling.
The 'inquirer' package is another alternative that provides a more interactive experience. It supports various types of prompts like lists, checkboxes, and password fields. It is ideal for building interactive command-line interfaces.
The 'readline-sync' package allows for synchronous reading of user input from the command line. It is similar to 'read' but provides more control over the input process, including the ability to handle multiple lines of input.
FAQs
read(1) for node programs
The npm package read receives a total of 3,815,625 weekly downloads. As such, read popularity was classified as popular.
We found that read demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.

Research
/Security News
A malicious Chrome extension steals newly created MEXC API keys, exfiltrates them to Telegram, and enables full account takeover with trading and withdrawal rights.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.