assert
The node:assert module provides a set of assertion functions for verifyinginvariants.
async_hooks
We strongly discourage the use of the async_hooks API.Other APIs that can cover most of its use cases include:
buffer
Buffer objects are used to represent a fixed-length sequence of bytes. ManyNode.js APIs support Buffers.
child_process
The node:child_process module provides the ability to spawn subprocesses ina manner that is similar, but not identical, to popen(3). This capabilityis primarily provided by the spawn function:
cluster
Clusters of Node.js processes can be used to run multiple instances of Node.jsthat can distribute workloads among their application threads. When process isolationis not needed, use the worker_threadsmodule instead, which allows running multiple application threads within a single Node.js instance.
console
The node:console module provides a simple debugging console that is similar tothe JavaScript console mechanism provided by web browsers.
crypto
The node:crypto module provides cryptographic functionality that includes aset of wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign, and verifyfunctions.
dgram
The node:dgram module provides an implementation of UDP datagram sockets.
diagnostics_channel
The node:diagnostics_channel module provides an API to create named channelsto report arbitrary message data for diagnostics purposes.
dns
The node:dns module enables name resolution. For example, use it to look up IPaddresses of host names.
dns/promises
The dns.promises API provides an alternative set of asynchronous DNS methodsthat return Promise objects rather than using callbacks. The API is accessiblevia import { promises as dnsPromises } from 'node:dns' or import dnsPromises from 'node:dns/promises'.
domain
This module is pending deprecation. Once a replacement API has beenfinalized, this module will be fully deprecated. Most developers shouldnot have cause to use this module. Users who absolutely must havethe functionality that domains provide may rely on it for the time beingbut should expect to have to migrate to a different solutionin the future.
events
Much of the Node.js core API is built around an idiomatic asynchronousevent-driven architecture in which certain kinds of objects (called "emitters")emit named events that cause Function objects ("listeners") to be called.
fs
The node:fs module enables interacting with the file system in away modeled on standard POSIX functions.
fs/promises
The fs/promises API provides asynchronous file system methods that returnpromises.
http
To use the HTTP server and client one must import the node:http module.
https
HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as aseparate module.
inspector
The node:inspector module provides an API for interacting with the V8inspector.
inspector/promises
The node:inspector/promises module provides an API for interacting with the V8inspector.
net
The node:net module provides an asynchronous network API for creating stream-basedTCP or IPC servers (createServer) and clients(createConnection).
os
The node:os module provides operating system-related utility methods andproperties. It can be accessed using:
path
The node:path module provides utilities for working with file and directorypaths. It can be accessed using:
perf_hooks
This module provides an implementation of a subset of the W3C Web Performance APIs as well as additional APIs forNode.js-specific performance measurements.
punycode
**The version of the punycode module bundled in Node.js is being deprecated. **In a future major version of Node.js this module will be removed. Userscurrently depending on the punycode module should switch to using theuserland-provided Punycode.js module instead. For punycode-based URLencoding, see url.domainToASCII or, more generally, the WHATWG URL API.
querystring
The node:querystring module provides utilities for parsing and formatting URLquery strings. It can be accessed using:
readline
The node:readline module provides an interface for reading data from a Readable stream(such as process.stdin) one line at a time.
repl
The node:repl module provides a Read-Eval-Print-Loop (REPL) implementationthat is available both as a standalone program or includible in otherapplications. It can be accessed using:
sea
This feature allows the distribution of a Node.js application conveniently to asystem that does not have Node.js installed.
sqlite
The node:sqlite module facilitates working with SQLite databases.To access it:
stream
A stream is an abstract interface for working with streaming data in Node.js.The node:stream module provides an API for implementing the stream interface.
string_decoder
The node:string_decoder module provides an API for decoding Buffer objectsinto strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16characters. It can be accessed using:
test/reporters
The node:test/reporters module exposes the builtin-reporters for node:test.To access it:
timers
The timer module exposes a global API for scheduling functions tobe called at some future period of time. Because the timer functions areglobals, there is no need to import node:timers to use the API.
timers/promises
The timers/promises API provides an alternative set of timer functionsthat return Promise objects. The API is accessible via import timersPromises from 'node:timers/promises'.
tls
The node:tls module provides an implementation of the Transport Layer Security(TLS) and Secure Socket Layer (SSL) protocols that is built on top of OpenSSL.The module can be accessed using:
trace_events
The node:trace_events module provides a mechanism to centralize tracing informationgenerated by V8, Node.js core, and userspace code.
tty
The node:tty module provides the tty.ReadStream and tty.WriteStream classes. In most cases, it will not be necessary or possible to use this moduledirectly. However, it can be accessed using:
url
The node:url module provides utilities for URL resolution and parsing. It canbe accessed using:
util
The node:util module supports the needs of Node.js internal APIs. Many of theutilities are useful for application and module developers as well. To accessit:
vm
The node:vm module enables compiling and running code within V8 VirtualMachine contexts.
wasi
The node:wasi module does not currently provide thecomprehensive file system security properties provided by some WASI runtimes.Full support for secure file system sandboxing may or may not be implemented infuture. In the mean time, do not rely on it to run untrusted code.
worker_threads
The node:worker_threads module enables the use of threads that executeJavaScript in parallel. To access it:
zlib
The node:zlib module provides compression functionality implemented usingGzip, Deflate/Inflate, and Brotli.