NODEJS(1)
๐ hey bestie, welcome to NODE(1) ๐
Okay so NODE(1) is the manual page for the Node.js runtime, and we are gonna get through it together because there is a LOT here and it's genuinely iconic. Grab a snack ๐. This is part 1, and there's more coming, so don't go anywhere.
โจ NAME โจ
node โ it's the server-side JavaScript runtime, no cap. ๐
๐ SYNOPSIS ๐
Look at the shapes it can take. Every one of these is real, copy them exactly:
node [options] [v8-options] [-e string | script.js | -] [--]
[arguments ...]
node inspect [<program-entry-point> | -e string | <host>:<port>] ...
node [--v8-options]
๐ฆ DESCRIPTION ๐ฆ
So. Node.js is a whole set of libraries for JavaScript that lets you run it outside of the browser. That's the entire vibe. ๐ธ
It is primarily focused on making simple, easy-to-build network clients and servers. Like, that's its main character energy.
And listen โ if you just run node with no arguments at all? It drops you straight into a REPL. Cute, right? ๐
๐ OPTIONS ๐
Okay this is the big one. Forty-something options. We are doing ALL of them, nobody gets left behind. ๐ซถ
-โ this is an alias for stdin, same energy as using-in other command-line utilities. The script that gets executed is read from stdin, and the remaining arguments get passed along to the script. ๐--โ this says the options are done, bestie. Everything after it gets passed to the script.
And plot twist: if no script filename or eval/print script was supplied before this point, then the next argument gets used as the script filename. ๐
--abort-on-uncaught-exceptionโ aborting instead of exiting causes a core file to be generated for analysis. Not exiting โ aborting. Different thing. ๐--allow-fs-readโ allow file system read access when you're using the permission model.--allow-fs-writeโ allow file system write access when you're using the permission model.--allow-addonsโ allow using native addons when you're using the permission model.--allow-child-processโ allow spawning processes when you're using the permission model.--allow-inspectorโ allow inspector access when you're using the permission model.--allow-wasiโ allow execution of WASI when you're using the permission model.--allow-workerโ allow creating worker threads when you're using the permission model.--completion-bashโ prints a source-able bash completion script for Node.js. Handy. โญ-C,--conditionsstring โ use custom conditional exports conditions. The value is a string.--cpu-profโ starts the V8 CPU profiler on start up, and writes the CPU profile to disk before exit. If--cpu-prof-dirisn't specified, the profile gets written to the current working directory with a generated file name. ๐ฅ--cpu-prof-dirโ the directory where the CPU profiles generated by--cpu-profwill be placed. The default value is controlled by the--diagnostic-dircommand-line option.--cpu-prof-intervalโ the sampling interval in microseconds for the CPU profiles generated by--cpu-prof. The default is1000.--cpu-prof-nameโ file name of the V8 CPU profile generated with--cpu-prof.--diagnostic-dirโ sets the directory for all diagnostic output files. Default is the current working directory. Sets the directory to which all diagnostic output files will be written to. Defaults to current working directory. It affects the default output directory of:--cpu-prof-dir,--heap-prof-dir,--redirect-warnings.- *
--disable-proto=mode* โ disables theObject.prototype.__proto__property. If mode isdelete, the property gets removed entirely. If mode isthrow, accesses to the property will throw an exception with the codeERR_PROTO_ACCESS. - *
--disable-wasm-trap-handler=mode* โ disables trap-handler-based WebAssembly bound checks and falls back to inline bound checks, so that WebAssembly can be run with limited virtual memory. --disallow-code-generation-from-stringsโ makes built-in language features likeevalandnew Functionthat generate code from strings throw an exception instead. Heads up: this does not affect the Node.jsvmmodule. ๐ง--enable-fipsโ enables FIPS-compliant crypto at startup. Requires Node.js to be built with./configure --openssl-fips.--enable-source-mapsโ enables Source Map V3 support for stack traces.--entry-urlโ interpret the entry point as a URL.--experimental-addon-modulesโ enables experimental addon module support.--experimental-config-file,--experimental-config-file=config,--experimental-default-config-fileโ if present, Node.js will look for a configuration file at the specified path. If the path is not specified, Node.js will look for anode.config.jsonfile in the current working directory. To specify a custom path, use the--experimental-config-file=pathform. The space-separated--experimental-config-filepath form is not supported. Node.js will read the configuration file and apply the settings. The configuration file should be a JSON file with this structure โ and thevX.Y.Zin the$schemamust be replaced with the version of Node.js you are using. ๐
{
"$schema": "https://nodejs.org/dist/vX.Y.Z/docs/node-config-schema.json",
"nodeOptions": {
"import": [
"amaro/strip"
],
"watch-path": "src",
"watch-preserve-output": true
},
"testRunner": {
"test-isolation": "process"
},
"watch": {
"watch-preserve-output": true
}
}
The configuration file supports namespace-specific options:
- The
nodeOptionsfield contains CLI flags that are allowed inNODE_OPTIONS. - Namespace fields like
testRunnercontain configuration specific to that subsystem.
No-op flags are not supported. Not all V8 flags are currently supported. It's possible to use the official JSON schema to validate the configuration file, which may vary depending on the Node.js version. Each key in the configuration file corresponds to a flag that can be passed as a command-line argument. The value of the key is the value that would be passed to the flag. For example, the configuration file above is equivalent to these command-line arguments:
node --import amaro/strip --watch-path=src --watch-preserve-output --test-isolation=process
The priority in configuration goes like this:
NODE_OPTIONSand command-line options- Dotenv
NODE_OPTIONS - Configuration file
Values in the configuration file will not override the values in the environment variables, command-line options, or the NODE_OPTIONS env file parsed by the --env-file flag. Keys cannot be duplicated within the same or different namespaces. The configuration parser will throw an error if the configuration file contains unknown keys or keys that cannot be used in a namespace.
โ ๏ธ Okay this part is IMPORTANT, bestie. Node.js will not sanitize or perform validation on the user-provided configuration, so NEVER use untrusted configuration files. Never ever. ๐จ
--experimental-default-config-fileโ this flag is an alias for--experimental-config-filewithout an argument. If present, Node.js will look for anode.config.jsonfile in the current working directory and load it as a configuration file.--experimental-import-meta-resolveโ enables experimental ES modules support forimport.meta.resolve().--experimental-import-textโ enables experimental support for importing modules withwith { type: 'text' }.- *
--experimental-loader=module* โ specify the module to use as a custom module loader. --permissionโ enables the permission model. ๐--experimental-shadow-realmโ use this flag to enable ShadowRealm support.--experimental-test-coverageโ enables code coverage in the test runner.--experimental-test-module-mocksโ enables module mocking in the test runner.--experimental-transform-typesโ enables transformation of TypeScript-only syntax into JavaScript code.--experimental-eventsourceโ enables experimental support for the EventSource Web API.--no-experimental-websocketโ disables experimental support for the WebSocket API.--experimental-webstorageโ enables experimental support for the Web Storage API.--no-experimental-repl-awaitโ disables top-levelawaitkeyword support in the REPL.--no-experimental-sqliteโ disables the experimentalnode:sqlitemodule.--no-require-moduleโ disables support for loading ECMAScript modules withrequire().--no-strip-typesโ disables type-stripping for TypeScript files.--experimental-test-tag-filtertagโ run only tests whose tag set contains tag. It may be specified multiple times; tests must contain every filter to run.--experimental-vm-modulesโ enables experimental ES module support in the VM module.--experimental-wasi-unstable-preview1โ enables experimental WebAssembly System Interface support. This flag is no longer required as WASI is enabled by default. ๐--experimental-quicโ enables the experimental QUIC support.--experimental-inspector-network-resourceโ enables experimental support for inspector network resources.--experimental-storage-inspectionโ enables experimental support for storage inspection.--force-context-awareโ disables loading native addons that are not context-aware. ๐--force-fipsโ forces FIPS-compliant crypto on startup (this cannot be disabled from script code). Same requirements as--enable-fips.--frozen-intrinsicsโ enables experimental frozen intrinsics support.- *
--heapsnapshot-near-heap-limit=max_count* โ generates a heap snapshot when the V8 heap usage is approaching the heap limit. No more than the specified number of snapshots will be generated. - *
--heapsnapshot-signal=signal* โ generates a heap snapshot on the specified signal. --heap-profโ starts the V8 heap profiler on start up, and writes the heap profile to disk before exit. If--heap-prof-dirisn't specified, the profile gets written to the current working directory with a generated file name. โจ--heap-prof-dirโ the directory where the heap profiles generated by--heap-profwill be placed. The default value is controlled by the--diagnostic-dircommand-line option.--heap-prof-intervalโ the average sampling interval in bytes for the heap profiles generated by--heap-prof. The default is512 * 1024.--heap-prof-nameโ file name of the V8 heap profile generated with--heap-prof.- *
--icu-data-dir=file* โ specifies the ICU data load path. This overridesNODE_ICU_DATA. ๐
and that's where part 1 wraps, bestie โ but WE ARE NOT DONE, there's more coming ๐ฆ
--input-type=typeโ sets the module resolution type for input coming in via--eval,--printor STDIN. yes bestie, that's the vibe ๐--inspect-brk=[host:]portโ turns the inspector on at host:port and then breaks at the very start of your user script, so you get to peek before anything even happens ๐ซถ--inspect-port=[host:]portโ picks which host:port the inspector should live on when it gets activated.--inspect-publish-uid=stderr,httpโ controls how the inspector's WebSocket URL gets exposed. Valid values arestderrandhttp. Default isstderr,httpโจ--inspect-wait=[host:]portโ turns the inspector on at host:port and then justโฆ waits for a debugger to attach. no rush, take your time ๐ฆ--inspect=[host:]portโ turns the inspector on at host:port. Default is127.0.0.1:9229๐
So the whole V8 Inspector integration thing is what lets you attach Chrome DevTools and IDEs to Node.js instances for debugging and profiling. It uses the Chrome DevTools Protocol. iconic behavior, fr fr ๐ฅ
--insecure-http-parserโ uses an insecure HTTP parser that accepts invalid HTTP headers. This may allow interoperability with non-conformant HTTP implementations. It may also allow request smuggling and other HTTP attacks that rely on invalid headers being accepted.
Avoid using this option. like, genuinely. avoid it. ๐
--jitlessโ disables runtime allocation of executable memory. This may be required on some platforms for security reasons. It can also reduce attack surface on other platforms, but the performance impact may be severe ๐ญ
This flag is inherited from V8 and is subject to change upstream. It may disappear in a non-semver-major release. so don't get too attached bestie ๐
--localstorage-file=fileโ the file used to storelocalStoragedata.--max-http-header-size=sizeโ specify the maximum size of HTTP headers in bytes. Defaults to 16 KiB. ๐--max-old-space-size-percentage=percentageโ sets the maximum memory size of V8's old memory section as a percentage of available system memory. This flag takes precedence over--max-old-space-sizewhen both are specified. The percentage parameter must be a number greater than 0 and up to 100, representing the percentage of available system memory to allocate to the V8 heap.
Note: This flag utilizes --max-old-space-size, which may be unreliable on 32-bit platforms due to integer overflow issues. ๐ซ
--napi-modulesโ this option is a no-op. It is kept for compatibility. it's literally just standing there, being decorative ๐--no-deprecationโ silences deprecation warnings.--no-extra-info-on-fatal-exceptionโ hides extra information on fatal exception that causes exit.--no-force-async-hooks-checksโ disables runtime checks forasync_hooks. These will still be enabled dynamically whenasync_hooksis enabled.--no-addonsโ disables thenode-addonsexports condition as well as disables loading native addons. When--no-addonsis specified, callingprocess.dlopenor requiring a native C++ addon will fail and throw an exception. ๐ซ--no-global-search-pathsโ do not search modules from global paths.--no-warningsโ silences all process warnings (including deprecations). blessed silence ๐ง--node-memory-debugโ enables extra debug checks for memory leaks in Node.js internals. This is usually only useful for developers debugging Node.js itself. iykyk ๐ง--openssl-config=fileโ loads an OpenSSL configuration file on startup. Among other uses, this can be used to enable FIPS-compliant crypto if Node.js is built with./configure --openssl-fips.--pending-deprecationโ emits pending deprecation warnings.--preserve-symlinksโ instructs the module loader to preserve symbolic links when resolving and caching modules other than the main module.--preserve-symlinks-mainโ instructs the module loader to preserve symbolic links when resolving and caching the main module.--profโ generate V8 profiler output. go off ๐--prof-processโ process V8 profiler output generated using the V8 option--prof.--redirect-warnings=fileโ write process warnings to the given file instead of printing tostderr.--report-compactโ write diagnostic reports in a compact format, single-line JSON.--report-dir,--report-directoryโ location at which the diagnostic report will be generated. Thefilename may be an absolute path. If it is not, the default directory it will be written to is controlled by the--diagnostic-dir. command-line option.--report-filenameโ name of the file to which the diagnostic report will be written.--report-on-fatalerrorโ enables the diagnostic report to be triggered on fatal errors (internal errors within the Node.js runtime such as out of memory) that leads to termination of the application. Useful to inspect various diagnostic data elements such as heap, stack, event loop state, resource consumption etc. to reason about the fatal error. detective mode fr ๐--report-on-signalโ enables diagnostic report to be generated upon receiving the specified (or predefined) signal to the running Node.js process. Default signal isSIGUSR2.--report-signalโ sets or resets the signal for diagnostic report generation (not supported on Windows). Default signal isSIGUSR2.--report-uncaught-exceptionโ enables diagnostic report to be generated on un-caught exceptions. Useful when inspecting JavaScript stack in conjunction with native stack and other runtime environment data.--secure-heap=nโ specify the size of the OpenSSL secure heap. Any value less than 2 disables the secure heap. The default is 0. The value must be a power of two. โ๏ธ (power of two, bestie, not just any number)--secure-heap-min=nโ specify the minimum allocation from the OpenSSL secure heap. The default is 2. The value must be a power of two.--testโ starts the Node.js command line test runner. ๐งช--test-concurrencyโ the maximum number of test files that the test runner CLI will execute concurrently.--test-coverage-branches=thresholdโ require a minimum threshold for branch coverage (0 - 100).--test-coverage-excludeโ a glob pattern that excludes matching files from the coverage report.--test-coverage-functions=thresholdโ require a minimum threshold for function coverage (0 - 100).--test-coverage-includeโ a glob pattern that only includes matching files in the coverage report.--test-coverage-lines=thresholdโ require a minimum threshold for line coverage (0 - 100).--test-force-exitโ configures the test runner to exit the process once all known tests have finished executing even if the event loop would otherwise remain active. bye bestie ๐--test-global-setupโ specifies a module containing global setup and teardown functions for the test runner.--test-isolation=modeโ configures the type of test isolation used in the test runner.--test-name-patternโ a regular expression that configures the test runner to only execute tests whose name matches the provided pattern.--test-random-seedโ set the seed used to randomize test execution order. This applies to both test file execution order and queued tests within each file. Providing this flag enables randomization implicitly, even without--test-randomize. The value must be an integer between 0 and 4294967295. This flag cannot be used with--watchor--test-rerun-failures. ๐ฒ--test-randomizeโ randomize test execution order. This applies to both test file execution order and queued tests within each file. This can help detect tests that rely on shared state or execution order. The seed used for randomization is printed in the test summary and can be reused with--test-random-seed. This flag cannot be used with--watchor--test-rerun-failures. ๐--test-reporterโ a test reporter to use when running tests.--test-reporter-destinationโ the destination for the corresponding test reporter.--test-rerun-failuresโ configures the tests runner to persist the state of tests to allow rerunning only failed tests.--test-onlyโ configures the test runner to only execute top level tests that have theonlyoption set.--test-shardโ test suite shard to execute in a format of<index>/<total>.--test-skip-patternโ a regular expression that configures the test runner to skip tests whose name matches the provided pattern.--test-timeoutโ a number of milliseconds the test execution will fail after. โฐ--test-update-snapshotsโ regenerates the snapshot file used by the test runner for snapshot testing.--throw-deprecationโ throw errors for deprecations. no gentle warnings here, we're throwing hands ๐ฅ--title=titleโ specifyprocess.titleon startup.--tls-cipher-list=listโ specify an alternative default TLS cipher list. Requires Node.js to be built with crypto support. (Default)--tls-keylog=fileโ log TLS key material to a file. The key material is in NSSSSLKEYLOGFILEformat and can be used by software (such as Wireshark) to decrypt the TLS traffic. ๐--tls-max-v1.2โ set defaultmaxVersionto'TLSv1.2'. Use to disable support for TLSv1.3.--tls-max-v1.3โ set defaultmaxVersionto'TLSv1.3'. Use to enable support for TLSv1.3.--tls-min-v1.0โ set defaultminVersionto'TLSv1'. Use for compatibility with old TLS clients or servers.--tls-min-v1.1โ set defaultminVersionto'TLSv1.1'. Use for compatibility with old TLS clients or servers.--tls-min-v1.2โ set defaultminVersionto'TLSv1.2'. This is the default for 12.x and later, but the option is supported for compatibility with older Node.js versions.--tls-min-v1.3โ set defaultminVersionto'TLSv1.3'. Use to disable support for TLSv1.2 in favour of TLSv1.3, which is more secure. โจ--trace-deprecationโ print stack traces for deprecations.--trace-event-categories categoriesโ a comma-separated list of categories that should be traced when trace event tracing is enabled using--trace-events-enabled.--trace-event-file-patternpattern โ okay so bestie, this is the template string that says where your trace event data filepath should live. It supports${rotation}and${pid}and that's the whole vibe. โจ--trace-events-enabledโ turn on the collection of trace event tracing information. Basically: let the tracing girlies gather their data. ๐--trace-exitโ prints a stack trace whenever an environment is exited proactively, i.e. invokingprocess.exit(). No cap, it's giving โwho left the function without saying bye?โ ๐ญ--trace-sigintโ prints a stack trace on SIGINT. So when Ctrl+C shows up, you get the receipts. ๐ฅ--trace-sync-ioโ print a stack trace whenever synchronous I/O is detected after the first turn of the event loop. It's the โnot me checking for blocking I/Oโ flag, fr fr. ๐--trace-tlsโ prints TLS packet trace information to stderr. Secure gossip, but make it packet-level. ๐--trace-uncaughtโ print stack traces for uncaught exceptions; usually, the stack trace associated with the creation of an Error is printed, whereas this makes Node.js also print the stack trace associated with throwing the value (which does not need to be an Error instance). Iconic extra detail, honestly.
Careful bestie: enabling this option may affect garbage collection behavior negatively. ๐
--trace-warningsโ print stack traces for process warnings (including deprecations). So every little โhey maybe don't do thatโ gets a full backstory. ๐--track-heap-objectsโ track heap object allocations for heap snapshots. Heap snooping, but make it forensic. ๐ฆ--unhandled-rejections=mode โ define the behavior for unhandled rejections, bestie. Can be one ofstrict(raise an error),warn(enforce warnings) ornone(silence warnings). Pick your fighter. ๐--use-bundled-ca,--use-openssl-caโ use bundled Mozilla CA store as supplied by current Node.js version, or use OpenSSL's default CA store. The default store is selectable at build-time. The bundled CA store, as supplied by Node.js, is a snapshot of Mozilla CA store that is fixed at release time. It is identical on all supported platforms. Using OpenSSL store allows for external modifications of the store. For most Linux and BSD distributions, this store is maintained by the distribution maintainers and system administrators. OpenSSL CA store location is dependent on configuration of the OpenSSL library but this can be altered at runtime using environment variables. SeeSSL_CERT_DIRandSSL_CERT_FILE. Certified CA lore, no cap. ๐--use-env-proxyโ parse proxy settings fromHTTP_PROXY/HTTPS_PROXY/NO_PROXYenvironment variables and apply the setting in global HTTP/HTTPS clients. It's giving โthe environment said so, so we did it.โ โจ--use-system-caโ use the trusted CA certificates present in the system store, in addition to the certificates in the bundled Mozilla CA store and certificates fromNODE_EXTRA_CA_CERTS. On Windows and macOS, it uses system APIs to integrate additional trusted certificates. On other platforms it is similar to--use-openssl-cawith the difference being that it caches the certificates on first load, and the system certificates are added in a complementary manner without replacing certificates from other sources. This flag supersedes--use-openssl-ca. Main character CA energy, honestly. ๐--use-largepages=mode โ re-map the Node.js static code to large memory pages at startup. If supported on the target system, this will cause the Node.js static code to be moved onto 2 MiB pages instead of 4 KiB pages. mode must have one of the following values:off(the default value, meaning do not map),on(map and ignore failure, reporting it to stderr), orsilent(map and silently ignore failure). Big pages, big feels. ๐--v8-optionsโ print V8 command-line options. It's the V8 menu, bestie. ๐--v8-pool-size=num โ set V8's thread pool size which will be used to allocate background jobs. If set to 0 then V8 will choose an appropriate size of the thread pool based on the number of online processors. If the value provided is larger than V8's maximum, then the largest value will be chosen. So, like, don't fight the max. ๐ญ--watchโ starts Node.js in watch mode. When in watch mode, changes in the watched files cause the Node.js process to restart. By default, watch mode will watch the entry point and any required or imported module. Use--watch-pathto specify what paths to watch. Restart era. ๐ฅ--watch-pathโ starts Node.js in watch mode and specifies what paths to watch. When in watch mode, changes in the watched paths cause the Node.js process to restart. This will turn off watching of required or imported modules, even when used in combination with--watch. So it's giving โI said what I said, watch only this.โ ๐--watch-kill-signalโ customizes the signal sent to the process on watch mode restarts. Choose your own restart drama. ๐--zero-fill-buffersโ automatically zero-fills all newly allocatedBufferandSlowBufferinstances. Clean slate, zero crumbs, periodt. โจ-c,--checkโ check the script's syntax without executing it. Exits with an error code if script is invalid. It's the vibe check before the actual run. ๐-e,--evalstring โ evaluate string as JavaScript. Just run the little snippet, bestie. ๐-h,--helpโ print command-line options. The output of this option is less detailed than this document. So this manual is the deluxe edition, iykyk. ๐-i,--interactiveโ open the REPL even if stdin does not appear to be a terminal. Forced interactive mode, no questions asked. ๐ฆ-p,--printstring โ identical to-e, but prints the result. Evaluate, then spill the tea. โ-r,--requiremodule โ preload the specified module at startup. Followsrequire()'s module resolution rules. module may be either a path to a file, or a Node.js module name. Preload before the main character enters. ๐-v,--versionโ print node's version. Short, sweet, iconic. ๐
๐ ENVIRONMENT ๐
okay bestie, this is the part where we meet all the environment variables, aka the little gremlins hanging out in your shell that Node.js reads and obeys. they are literally so powerful. respect them. ๐
FORCE_COLORโ flips on ANSI colorized output โจ. the value can be1,true, or an empty string to say "gimme 16-color support",2for 256-color support, or3for 16 million-color support (rich girl behavior ๐ ). when it's set to one of those supported values, it flat-out ignores bothNO_COLORandNODE_DISABLE_COLORS, no cap. any other value? colorized output gets disabled. bye.NO_COLORโ literally just an alias forNODE_DISABLE_COLORS. same girl, different name ๐ซถNODE_COMPILE_CACHEdir โ turns on the module compile cache for the Node.js instance.NODE_COMPILE_CACHE_PORTABLEโ when you set it to'1'or'true', the module compile cache gets hit as long as the location of the modules relative to the cache directory stays consistent. pair it withNODE_COMPILE_CACHEto get portable on-disk caching ๐ฅNODE_DEBUGmodules... โ a comma-separated list of core modules that should print debug info. nosy-on-purpose, we love that.NODE_DEBUG_NATIVEmodules... โ same vibe, but it's a comma-separated list of C++ core modules that should print debug information.NODE_DISABLE_COMPILE_CACHEโ disables the module compile cache for the Node.js instance. rude but valid.NODE_DISABLE_COLORSโ when set to1, colors will not be used in the REPL. default to colorless, we respect the choice ๐NODE_EXTRA_CA_CERTSfile โ set this and the well-known "root" CAs (like VeriSign) get extended with the extra certificates in file. the file should have one or more trusted certificates in PEM format.
if file is missing or misformatted, a message gets emitted once using process.emitWarning(), but any errors are otherwise ignored. lowkey lenient.
this environment variable is ignored when node runs as setuid root or has Linux file capabilities set. ๐จ
also important: NODE_EXTRA_CA_CERTS is only read when the Node.js process is first launched. changing the value at runtime with process.env.NODE_EXTRA_CA_CERTS does absolutely nothing to the current process. it's giving "that ship has sailed" ๐ฆ
NODE_ICU_DATAfile โ data path for ICU (that's theIntlobject) data. it will extend linked-in data when compiled withsmall-icusupport.NODE_NO_WARNINGSโ when set to1, process warnings are silenced. shhh ๐คซNODE_OPTIONSoptions... โ a space-separated list of command-line options, interpreted as if they had been specified on the command line before the actual command (so the real ones can override them). Node.js will exit with an error if an option that isn't allowed in the environment gets used, like--printor a script file. so don't try it ๐NODE_PATHdirectories... โ a colon-separated list of directories prefixed to the module search path.NODE_PENDING_DEPRECATIONโ when set to1, emit pending deprecation warnings. the ghosts of APIs past โจNODE_PENDING_PIPE_INSTANCESโ sets the number of pending pipe instance handles when the pipe server is waiting for connections. heads up: this setting applies to Windows only ๐ชNODE_PRESERVE_SYMLINKSโ when set to1, the module loader preserves symbolic links when resolving and caching modules. no breaking the links, bestie ๐NODE_REDIRECT_WARNINGSfile โ write process warnings to the given file instead of printing tostderr. it's equivalent to passing--redirect-warnings fileon the command line. same energy, different outfit.NODE_REPL_HISTORYfile โ path to the file used to store persistent REPL history. the default path is~/.node_repl_history, which this variable overrides. setting the value to an empty string (""or" ") disables persistent REPL history entirely. rip to your past commands ๐NODE_REPL_EXTERNAL_MODULEfile โ path to a Node.js module that gets loaded in place of the built-in REPL. overriding this value to an empty string ('') will use the built-in REPL. we're back to default, iconic.NODE_SKIP_PLATFORM_CHECKโ when set to1, the check for a supported platform is skipped during Node.js startup. Node.js might not execute correctly. any issues you hit on unsupported platforms will not be fixed. so likeโฆ proceed at your own risk, queen ๐NODE_TEST_CONTEXTโ when set to'child', test reporter options get overridden and test output is sent tostdoutin the TAP format. if you pass any other value, Node.js makes no guarantees about the reporter format used or its stability. chaos, but make it documented ๐ธNODE_TLS_REJECT_UNAUTHORIZEDโ when set to0, TLS certificate validation is disabled. extreme. dramatic. please be careful.NODE_USE_ENV_PROXYโ when enabled, Node.js parses theHTTP_PROXY,HTTPS_PROXYandNO_PROXYenvironment variables during startup, and tunnels requests over the specified proxy. currently this only affects requests sent overfetch(). support for other built-inhttpandhttpsmethods is under way โ the rest is coming, bestie, be patient ๐ฆNODE_USE_SYSTEM_CAโ similar to--use-system-ca. it uses the trusted CA certificates present in the system store, in addition to the certificates in the bundled Mozilla CA store and certificates fromNODE_EXTRA_CA_CERTS. more trust, more friends ๐NODE_V8_COVERAGEdir โ when set, Node.js writes JavaScript code coverage information to dir.OPENSSL_CONFfile โ load an OpenSSL configuration file on startup. among other uses, this can enable FIPS-compliant crypto if Node.js is built with./configure --openssl-fips. heads up though: if the--openssl-configcommand-line option is used, this environment variable is ignored. command line wins, always ๐SSL_CERT_DIRdir โ if--use-openssl-cais enabled, this overrides and sets OpenSSL's directory containing trusted certificates.SSL_CERT_FILEfile โ if--use-openssl-cais enabled, this overrides and sets OpenSSL's file containing trusted certificates.TZโ specify the timezone configuration. time is a construct anyway โญUV_THREADPOOL_SIZEsize โ sets the number of threads used in libuv's threadpool to size. threadpool glow-up, slay.
๐ BUGS ๐
bugs are tracked in GitHub Issues: https://github.com/nodejs/node/issues โ go report them, bestie, that's how software grows ๐
๐ COPYRIGHT ๐
copyright Node.js contributors. Node.js is available under the MIT license.
Node.js also includes external libraries that are available under a variety of licenses. see https://github.com/nodejs/node/blob/HEAD/LICENSE for the full license text.
๐ SEE ALSO ๐
- website:
https://nodejs.org/ - documentation:
https://nodejs.org/api/ - GitHub repository and issue tracker:
https://github.com/nodejs/node
and that's a wrap on the whole NODE(1) page, bestie!! ๐ this is the Node.js manual, and the footer stamps it with 2018 and the NODE(1) label โ so consider yourself fully caught up. go forth and node responsibly ๐ซถโจ๐
๐ฆ where this page comes from
- ubuntu stonking: nodejs 24.19.0+dfsg+~cs24.13.3-1ubuntu1 ยท MIT
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms