Modules

module.builtinModules

Lists built-in names in the running release. The list is version dependent and excludes some prefix-only modules. Tested on Node.js 22.16.0. Example output (one line per entry): ["true false"].

Formal Syntax & Structure

nodejs syntaxnodejs
module.builtinModules

Return Value

string[]

Built-in names.

Working Example

Example Snippetnodejs
import { builtinModules } from 'node:module';console.log(builtinModules.includes('fs'), builtinModules.includes('fictional-catalog-plugin'));
Node.js Reference