gareth asked this 2 years ago

Get a list of core Node.js modules

How can i get a complete list of all built-in modules available with my Node.js installation?


Best Answer by noddy
3 likes

Run the command on REPL

C:\>node
> require('repl')._builtinLibs

gareth 2 years ago
1 like

Yes thanks!

$ node -pe "require('repl')._builtinLibs"
[ 'assert',
  'buffer',
  'child_process',
  'cluster',
  'crypto',
  'dgram',
  'dns',
  'domain',
  'events',
  'fs',
  'http',
  'https',
  'net',
  'os',
  'path',
  'punycode',
  'querystring',
  'readline',
  'repl',
  'stream',
  'string_decoder',
  'tls',
  'tty',
  'url',
  'util',
  'v8',
  'vm',
  'zlib' ]

That gives a list of core node.js modules on my installation.