- Assertion testing
- Asynchronous context tracking
- Async hooks
- Buffer
- C++ addons
- C/C++ addons with Node-API
- C++ embedder API
- Child processes
- Cluster
- Command-line options
- Console
- Corepack
- Crypto
- Debugger
- Deprecated APIs
- Diagnostics Channel
- DNS
- Domain
- Errors
- Events
- File system
- Globals
- HTTP
- HTTP/2
- HTTPS
- Inspector
- Internationalization
- Modules: CommonJS modules
- Modules: ECMAScript modules
- Modules:
node:module
API - Modules: Packages
- Net
- OS
- Path
- Performance hooks
- Permissions
- Process
- Punycode
- Query strings
- Readline
- REPL
- Report
- Stream
- String decoder
- Test runner
- Timers
- TLS/SSL
- Trace events
- TTY
- UDP/datagram
- URL
- Utilities
- V8
- VM
- WASI
- Web Crypto API
- Web Streams API
- Worker threads
- Zlib
Node.js v18.12.1 documentation
- Node.js v18.12.1
-
► Table of contents
- Command-line API
- Synopsis
- Program entry point
- Options
-
--
--abort-on-uncaught-exception
--build-snapshot
--completion-bash
-C=condition
,--conditions=condition
--cpu-prof
--cpu-prof-dir
--cpu-prof-interval
--cpu-prof-name
--diagnostic-dir=directory
--disable-proto=mode
--disallow-code-generation-from-strings
--dns-result-order=order
--enable-fips
--enable-source-maps
--experimental-global-customevent
--experimental-global-webcrypto
--experimental-import-meta-resolve
--experimental-loader=module
--experimental-network-imports
--experimental-policy
--no-experimental-fetch
--no-experimental-repl-await
--experimental-specifier-resolution=mode
--experimental-vm-modules
--experimental-wasi-unstable-preview1
--experimental-wasm-modules
--force-context-aware
--force-fips
--frozen-intrinsics
--force-node-api-uncaught-exceptions-policy
--heapsnapshot-near-heap-limit=max_count
--heapsnapshot-signal=signal
--heap-prof
--heap-prof-dir
--heap-prof-interval
--heap-prof-name
--icu-data-dir=file
--input-type=type
--inspect-brk[=[host:]port]
--inspect-port=[host:]port
--inspect[=[host:]port]
--inspect-publish-uid=stderr,http
--insecure-http-parser
--jitless
--max-http-header-size=size
--napi-modules
--no-addons
--no-deprecation
--no-extra-info-on-fatal-exception
--no-force-async-hooks-checks
--no-global-search-paths
--no-warnings
--node-memory-debug
--openssl-config=file
--openssl-shared-config
--openssl-legacy-provider
--pending-deprecation
--policy-integrity=sri
--preserve-symlinks
--preserve-symlinks-main
--prof
--prof-process
--redirect-warnings=file
--report-compact
--report-dir=directory
,report-directory=directory
--report-filename=filename
--report-on-fatalerror
--report-on-signal
--report-signal=signal
--report-uncaught-exception
--secure-heap=n
--secure-heap-min=n
--snapshot-blob=path
--test
--test-name-pattern
--test-only
--throw-deprecation
--title=title
--tls-cipher-list=list
--tls-keylog=file
--tls-max-v1.2
--tls-max-v1.3
--tls-min-v1.0
--tls-min-v1.1
--tls-min-v1.2
--tls-min-v1.3
--trace-atomics-wait
--trace-deprecation
--trace-event-categories
--trace-event-file-pattern
--trace-events-enabled
--trace-exit
--trace-sigint
--trace-sync-io
--trace-tls
--trace-uncaught
--trace-warnings
--track-heap-objects
--unhandled-rejections=mode
--update-assert-snapshot
--use-bundled-ca
,--use-openssl-ca
--use-largepages=mode
--v8-options
--v8-pool-size=num
--watch
--watch-path
--zero-fill-buffers
-c
,--check
-e
,--eval "script"
-h
,--help
-i
,--interactive
-p
,--print "script"
-r
,--require module
-v
,--version
- Environment variables
FORCE_COLOR=[1, 2, 3]
NODE_DEBUG=module[,…]
NODE_DEBUG_NATIVE=module[,…]
NODE_DISABLE_COLORS=1
NODE_EXTRA_CA_CERTS=file
NODE_ICU_DATA=file
NODE_NO_WARNINGS=1
NODE_OPTIONS=options...
NODE_PATH=path[:…]
NODE_PENDING_DEPRECATION=1
NODE_PENDING_PIPE_INSTANCES=instances
NODE_PRESERVE_SYMLINKS=1
NODE_REDIRECT_WARNINGS=file
NODE_REPL_HISTORY=file
NODE_REPL_EXTERNAL_MODULE=file
NODE_SKIP_PLATFORM_CHECK=value
NODE_TLS_REJECT_UNAUTHORIZED=value
NODE_V8_COVERAGE=dir
NO_COLOR=<any>
OPENSSL_CONF=file
SSL_CERT_DIR=dir
SSL_CERT_FILE=file
TZ
UV_THREADPOOL_SIZE=size
- Useful V8 options
- Command-line API
-
► Index
- Assertion testing
- Asynchronous context tracking
- Async hooks
- Buffer
- C++ addons
- C/C++ addons with Node-API
- C++ embedder API
- Child processes
- Cluster
- Command-line options
- Console
- Corepack
- Crypto
- Debugger
- Deprecated APIs
- Diagnostics Channel
- DNS
- Domain
- Errors
- Events
- File system
- Globals
- HTTP
- HTTP/2
- HTTPS
- Inspector
- Internationalization
- Modules: CommonJS modules
- Modules: ECMAScript modules
- Modules:
node:module
API - Modules: Packages
- Net
- OS
- Path
- Performance hooks
- Permissions
- Process
- Punycode
- Query strings
- Readline
- REPL
- Report
- Stream
- String decoder
- Test runner
- Timers
- TLS/SSL
- Trace events
- TTY
- UDP/datagram
- URL
- Utilities
- V8
- VM
- WASI
- Web Crypto API
- Web Streams API
- Worker threads
- Zlib
- ► Other versions
- ► Options
Table of contents
- Command-line API
- Synopsis
- Program entry point
- Options
-
--
--abort-on-uncaught-exception
--build-snapshot
--completion-bash
-C=condition
,--conditions=condition
--cpu-prof
--cpu-prof-dir
--cpu-prof-interval
--cpu-prof-name
--diagnostic-dir=directory
--disable-proto=mode
--disallow-code-generation-from-strings
--dns-result-order=order
--enable-fips
--enable-source-maps
--experimental-global-customevent
--experimental-global-webcrypto
--experimental-import-meta-resolve
--experimental-loader=module
--experimental-network-imports
--experimental-policy
--no-experimental-fetch
--no-experimental-repl-await
--experimental-specifier-resolution=mode
--experimental-vm-modules
--experimental-wasi-unstable-preview1
--experimental-wasm-modules
--force-context-aware
--force-fips
--frozen-intrinsics
--force-node-api-uncaught-exceptions-policy
--heapsnapshot-near-heap-limit=max_count
--heapsnapshot-signal=signal
--heap-prof
--heap-prof-dir
--heap-prof-interval
--heap-prof-name
--icu-data-dir=file
--input-type=type
--inspect-brk[=[host:]port]
--inspect-port=[host:]port
--inspect[=[host:]port]
--inspect-publish-uid=stderr,http
--insecure-http-parser
--jitless
--max-http-header-size=size
--napi-modules
--no-addons
--no-deprecation
--no-extra-info-on-fatal-exception
--no-force-async-hooks-checks
--no-global-search-paths
--no-warnings
--node-memory-debug
--openssl-config=file
--openssl-shared-config
--openssl-legacy-provider
--pending-deprecation
--policy-integrity=sri
--preserve-symlinks
--preserve-symlinks-main
--prof
--prof-process
--redirect-warnings=file
--report-compact
--report-dir=directory
,report-directory=directory
--report-filename=filename
--report-on-fatalerror
--report-on-signal
--report-signal=signal
--report-uncaught-exception
--secure-heap=n
--secure-heap-min=n
--snapshot-blob=path
--test
--test-name-pattern
--test-only
--throw-deprecation
--title=title
--tls-cipher-list=list
--tls-keylog=file
--tls-max-v1.2
--tls-max-v1.3
--tls-min-v1.0
--tls-min-v1.1
--tls-min-v1.2
--tls-min-v1.3
--trace-atomics-wait
--trace-deprecation
--trace-event-categories
--trace-event-file-pattern
--trace-events-enabled
--trace-exit
--trace-sigint
--trace-sync-io
--trace-tls
--trace-uncaught
--trace-warnings
--track-heap-objects
--unhandled-rejections=mode
--update-assert-snapshot
--use-bundled-ca
,--use-openssl-ca
--use-largepages=mode
--v8-options
--v8-pool-size=num
--watch
--watch-path
--zero-fill-buffers
-c
,--check
-e
,--eval "script"
-h
,--help
-i
,--interactive
-p
,--print "script"
-r
,--require module
-v
,--version
- Environment variables
FORCE_COLOR=[1, 2, 3]
NODE_DEBUG=module[,…]
NODE_DEBUG_NATIVE=module[,…]
NODE_DISABLE_COLORS=1
NODE_EXTRA_CA_CERTS=file
NODE_ICU_DATA=file
NODE_NO_WARNINGS=1
NODE_OPTIONS=options...
NODE_PATH=path[:…]
NODE_PENDING_DEPRECATION=1
NODE_PENDING_PIPE_INSTANCES=instances
NODE_PRESERVE_SYMLINKS=1
NODE_REDIRECT_WARNINGS=file
NODE_REPL_HISTORY=file
NODE_REPL_EXTERNAL_MODULE=file
NODE_SKIP_PLATFORM_CHECK=value
NODE_TLS_REJECT_UNAUTHORIZED=value
NODE_V8_COVERAGE=dir
NO_COLOR=<any>
OPENSSL_CONF=file
SSL_CERT_DIR=dir
SSL_CERT_FILE=file
TZ
UV_THREADPOOL_SIZE=size
Useful V8 options有用的V8选项
Command-line API#
Node.js comes with a variety of CLI options. Node.js提供了各种CLI选项。These options expose built-in debugging, multiple ways to execute scripts, and other helpful runtime options.这些选项公开了内置调试、多种执行脚本的方法以及其他有用的运行时选项。
To view this documentation as a manual page in a terminal, run 要在终端中将此文档作为手动页面查看,请运行man node
.man node
。