1<!DOCTYPE html> 2<html lang="en"> 3<head> 4 <meta charset="utf-8"> 5 <meta name="viewport" content="width=device-width"> 6 <meta name="nodejs.org:node-version" content="v14.19.1"> 7 <title>Errors | Node.js v14.19.1 Documentation</title> 8 <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic&display=fallback"> 9 <link rel="stylesheet" href="assets/style.css"> 10 <link rel="stylesheet" href="assets/hljs.css"> 11 <link rel="canonical" href="https://nodejs.org/api/errors.html"> 12</head> 13<body class="alt apidoc" id="api-section-errors"> 14 <div id="content" class="clearfix"> 15 <div id="column2" class="interior"> 16 <div id="intro" class="interior"> 17 <a href="/" title="Go back to the home page"> 18 Node.js 19 </a> 20 </div> 21 <ul> 22<li><a href="documentation.html" class="nav-documentation">About this documentation</a></li> 23<li><a href="synopsis.html" class="nav-synopsis">Usage and example</a></li> 24</ul> 25<hr class="line"> 26<ul> 27<li><a href="assert.html" class="nav-assert">Assertion testing</a></li> 28<li><a href="async_hooks.html" class="nav-async_hooks">Async hooks</a></li> 29<li><a href="buffer.html" class="nav-buffer">Buffer</a></li> 30<li><a href="addons.html" class="nav-addons">C++ addons</a></li> 31<li><a href="n-api.html" class="nav-n-api">C/C++ addons with Node-API</a></li> 32<li><a href="embedding.html" class="nav-embedding">C++ embedder API</a></li> 33<li><a href="child_process.html" class="nav-child_process">Child processes</a></li> 34<li><a href="cluster.html" class="nav-cluster">Cluster</a></li> 35<li><a href="cli.html" class="nav-cli">Command-line options</a></li> 36<li><a href="console.html" class="nav-console">Console</a></li> 37<li><a href="corepack.html" class="nav-corepack">Corepack</a></li> 38<li><a href="crypto.html" class="nav-crypto">Crypto</a></li> 39<li><a href="debugger.html" class="nav-debugger">Debugger</a></li> 40<li><a href="deprecations.html" class="nav-deprecations">Deprecated APIs</a></li> 41<li><a href="diagnostics_channel.html" class="nav-diagnostics_channel">Diagnostics Channel</a></li> 42<li><a href="dns.html" class="nav-dns">DNS</a></li> 43<li><a href="domain.html" class="nav-domain">Domain</a></li> 44<li><a href="errors.html" class="nav-errors active">Errors</a></li> 45<li><a href="events.html" class="nav-events">Events</a></li> 46<li><a href="fs.html" class="nav-fs">File system</a></li> 47<li><a href="globals.html" class="nav-globals">Globals</a></li> 48<li><a href="http.html" class="nav-http">HTTP</a></li> 49<li><a href="http2.html" class="nav-http2">HTTP/2</a></li> 50<li><a href="https.html" class="nav-https">HTTPS</a></li> 51<li><a href="inspector.html" class="nav-inspector">Inspector</a></li> 52<li><a href="intl.html" class="nav-intl">Internationalization</a></li> 53<li><a href="modules.html" class="nav-modules">Modules: CommonJS modules</a></li> 54<li><a href="esm.html" class="nav-esm">Modules: ECMAScript modules</a></li> 55<li><a href="module.html" class="nav-module">Modules: <code>module</code> API</a></li> 56<li><a href="packages.html" class="nav-packages">Modules: Packages</a></li> 57<li><a href="net.html" class="nav-net">Net</a></li> 58<li><a href="os.html" class="nav-os">OS</a></li> 59<li><a href="path.html" class="nav-path">Path</a></li> 60<li><a href="perf_hooks.html" class="nav-perf_hooks">Performance hooks</a></li> 61<li><a href="policy.html" class="nav-policy">Policies</a></li> 62<li><a href="process.html" class="nav-process">Process</a></li> 63<li><a href="punycode.html" class="nav-punycode">Punycode</a></li> 64<li><a href="querystring.html" class="nav-querystring">Query strings</a></li> 65<li><a href="readline.html" class="nav-readline">Readline</a></li> 66<li><a href="repl.html" class="nav-repl">REPL</a></li> 67<li><a href="report.html" class="nav-report">Report</a></li> 68<li><a href="stream.html" class="nav-stream">Stream</a></li> 69<li><a href="string_decoder.html" class="nav-string_decoder">String decoder</a></li> 70<li><a href="timers.html" class="nav-timers">Timers</a></li> 71<li><a href="tls.html" class="nav-tls">TLS/SSL</a></li> 72<li><a href="tracing.html" class="nav-tracing">Trace events</a></li> 73<li><a href="tty.html" class="nav-tty">TTY</a></li> 74<li><a href="dgram.html" class="nav-dgram">UDP/datagram</a></li> 75<li><a href="url.html" class="nav-url">URL</a></li> 76<li><a href="util.html" class="nav-util">Utilities</a></li> 77<li><a href="v8.html" class="nav-v8">V8</a></li> 78<li><a href="vm.html" class="nav-vm">VM</a></li> 79<li><a href="wasi.html" class="nav-wasi">WASI</a></li> 80<li><a href="worker_threads.html" class="nav-worker_threads">Worker threads</a></li> 81<li><a href="zlib.html" class="nav-zlib">Zlib</a></li> 82</ul> 83<hr class="line"> 84<ul> 85<li><a href="https://github.com/nodejs/node" class="nav-https-github-com-nodejs-node">Code repository and issue tracker</a></li> 86</ul> 87 </div> 88 89 <div id="column1" data-id="errors" class="interior"> 90 <header> 91 <div class="header-container"> 92 <h1>Node.js v14.19.1 documentation</h1> 93 <button class="theme-toggle-btn" id="theme-toggle-btn" title="Toggle dark mode/light mode" aria-label="Toggle dark mode/light mode" hidden> 94 <svg xmlns="http://www.w3.org/2000/svg" class="icon dark-icon" height="24" width="24"> 95 <path fill="none" d="M0 0h24v24H0z" /> 96 <path d="M11.1 12.08c-2.33-4.51-.5-8.48.53-10.07C6.27 2.2 1.98 6.59 1.98 12c0 .14.02.28.02.42.62-.27 1.29-.42 2-.42 1.66 0 3.18.83 4.1 2.15A4.01 4.01 0 0111 18c0 1.52-.87 2.83-2.12 3.51.98.32 2.03.5 3.11.5 3.5 0 6.58-1.8 8.37-4.52-2.36.23-6.98-.97-9.26-5.41z"/> 97 <path d="M7 16h-.18C6.4 14.84 5.3 14 4 14c-1.66 0-3 1.34-3 3s1.34 3 3 3h3c1.1 0 2-.9 2-2s-.9-2-2-2z"/> 98 </svg> 99 <svg xmlns="http://www.w3.org/2000/svg" class="icon light-icon" height="24" width="24"> 100 <path d="M0 0h24v24H0z" fill="none" /> 101 <path d="M6.76 4.84l-1.8-1.79-1.41 1.41 1.79 1.79 1.42-1.41zM4 10.5H1v2h3v-2zm9-9.95h-2V3.5h2V.55zm7.45 3.91l-1.41-1.41-1.79 1.79 1.41 1.41 1.79-1.79zm-3.21 13.7l1.79 1.8 1.41-1.41-1.8-1.79-1.4 1.4zM20 10.5v2h3v-2h-3zm-8-5c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm-1 16.95h2V19.5h-2v2.95zm-7.45-3.91l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8z"/> 102 </svg> 103 </button> 104 </div> 105 <div id="gtoc"> 106 <ul> 107 <li> 108 <a href="index.html">Index</a> 109 </li> 110 <li> 111 <a href="all.html">View on single page</a> 112 </li> 113 <li> 114 <a href="errors.json">View as JSON</a> 115 </li> 116 117 <li class="version-picker"> 118 <a href="#">View another version <span>▼</span></a> 119 <ol class="version-picker"><li><a href="https://nodejs.org/docs/latest-v17.x/api/errors.html">17.x</a></li> 120<li><a href="https://nodejs.org/docs/latest-v16.x/api/errors.html">16.x <b>LTS</b></a></li> 121<li><a href="https://nodejs.org/docs/latest-v15.x/api/errors.html">15.x</a></li> 122<li><a href="https://nodejs.org/docs/latest-v14.x/api/errors.html">14.x <b>LTS</b></a></li> 123<li><a href="https://nodejs.org/docs/latest-v13.x/api/errors.html">13.x</a></li> 124<li><a href="https://nodejs.org/docs/latest-v12.x/api/errors.html">12.x <b>LTS</b></a></li> 125<li><a href="https://nodejs.org/docs/latest-v11.x/api/errors.html">11.x</a></li> 126<li><a href="https://nodejs.org/docs/latest-v10.x/api/errors.html">10.x</a></li> 127<li><a href="https://nodejs.org/docs/latest-v9.x/api/errors.html">9.x</a></li> 128<li><a href="https://nodejs.org/docs/latest-v8.x/api/errors.html">8.x</a></li> 129<li><a href="https://nodejs.org/docs/latest-v7.x/api/errors.html">7.x</a></li> 130<li><a href="https://nodejs.org/docs/latest-v6.x/api/errors.html">6.x</a></li> 131<li><a href="https://nodejs.org/docs/latest-v5.x/api/errors.html">5.x</a></li> 132<li><a href="https://nodejs.org/docs/latest-v4.x/api/errors.html">4.x</a></li></ol> 133 </li> 134 135 <li class="edit_on_github"><a href="https://github.com/nodejs/node/edit/master/doc/api/errors.md">Edit on GitHub</a></li> 136 </ul> 137 </div> 138 <hr> 139 </header> 140 141 <details id="toc" open><summary>Table of contents</summary><ul> 142<li><a href="#errors_errors">Errors</a> 143<ul> 144<li><a href="#errors_error_propagation_and_interception">Error propagation and interception</a> 145<ul> 146<li><a href="#errors_error_first_callbacks">Error-first callbacks</a></li> 147</ul> 148</li> 149<li><a href="#errors_class_error">Class: <code>Error</code></a> 150<ul> 151<li><a href="#errors_new_error_message"><code>new Error(message)</code></a></li> 152<li><a href="#errors_error_capturestacktrace_targetobject_constructoropt"><code>Error.captureStackTrace(targetObject[, constructorOpt])</code></a></li> 153<li><a href="#errors_error_stacktracelimit"><code>Error.stackTraceLimit</code></a></li> 154<li><a href="#errors_error_code"><code>error.code</code></a></li> 155<li><a href="#errors_error_message"><code>error.message</code></a></li> 156<li><a href="#errors_error_stack"><code>error.stack</code></a></li> 157</ul> 158</li> 159<li><a href="#errors_class_assertionerror">Class: <code>AssertionError</code></a></li> 160<li><a href="#errors_class_rangeerror">Class: <code>RangeError</code></a></li> 161<li><a href="#errors_class_referenceerror">Class: <code>ReferenceError</code></a></li> 162<li><a href="#errors_class_syntaxerror">Class: <code>SyntaxError</code></a></li> 163<li><a href="#errors_class_systemerror">Class: <code>SystemError</code></a> 164<ul> 165<li><a href="#errors_error_address"><code>error.address</code></a></li> 166<li><a href="#errors_error_code_1"><code>error.code</code></a></li> 167<li><a href="#errors_error_dest"><code>error.dest</code></a></li> 168<li><a href="#errors_error_errno"><code>error.errno</code></a></li> 169<li><a href="#errors_error_info"><code>error.info</code></a></li> 170<li><a href="#errors_error_message_1"><code>error.message</code></a></li> 171<li><a href="#errors_error_path"><code>error.path</code></a></li> 172<li><a href="#errors_error_port"><code>error.port</code></a></li> 173<li><a href="#errors_error_syscall"><code>error.syscall</code></a></li> 174<li><a href="#errors_common_system_errors">Common system errors</a></li> 175</ul> 176</li> 177<li><a href="#errors_class_typeerror">Class: <code>TypeError</code></a></li> 178<li><a href="#errors_exceptions_vs_errors">Exceptions vs. errors</a></li> 179<li><a href="#errors_openssl_errors">OpenSSL errors</a> 180<ul> 181<li><a href="#errors_error_opensslerrorstack"><code>error.opensslErrorStack</code></a></li> 182<li><a href="#errors_error_function"><code>error.function</code></a></li> 183<li><a href="#errors_error_library"><code>error.library</code></a></li> 184<li><a href="#errors_error_reason"><code>error.reason</code></a></li> 185</ul> 186</li> 187<li><a href="#errors_node_js_error_codes">Node.js error codes</a> 188<ul> 189<li><a href="#errors_abort_err"><code>ABORT_ERR</code></a></li> 190<li><a href="#errors_err_ambiguous_argument"><code>ERR_AMBIGUOUS_ARGUMENT</code></a></li> 191<li><a href="#errors_err_arg_not_iterable"><code>ERR_ARG_NOT_ITERABLE</code></a></li> 192<li><a href="#errors_err_assertion"><code>ERR_ASSERTION</code></a></li> 193<li><a href="#errors_err_async_callback"><code>ERR_ASYNC_CALLBACK</code></a></li> 194<li><a href="#errors_err_async_type"><code>ERR_ASYNC_TYPE</code></a></li> 195<li><a href="#errors_err_brotli_compression_failed"><code>ERR_BROTLI_COMPRESSION_FAILED</code></a></li> 196<li><a href="#errors_err_brotli_invalid_param"><code>ERR_BROTLI_INVALID_PARAM</code></a></li> 197<li><a href="#errors_err_buffer_context_not_available"><code>ERR_BUFFER_CONTEXT_NOT_AVAILABLE</code></a></li> 198<li><a href="#errors_err_buffer_out_of_bounds"><code>ERR_BUFFER_OUT_OF_BOUNDS</code></a></li> 199<li><a href="#errors_err_buffer_too_large"><code>ERR_BUFFER_TOO_LARGE</code></a></li> 200<li><a href="#errors_err_cannot_watch_sigint"><code>ERR_CANNOT_WATCH_SIGINT</code></a></li> 201<li><a href="#errors_err_child_closed_before_reply"><code>ERR_CHILD_CLOSED_BEFORE_REPLY</code></a></li> 202<li><a href="#errors_err_child_process_ipc_required"><code>ERR_CHILD_PROCESS_IPC_REQUIRED</code></a></li> 203<li><a href="#errors_err_child_process_stdio_maxbuffer"><code>ERR_CHILD_PROCESS_STDIO_MAXBUFFER</code></a></li> 204<li><a href="#errors_err_closed_message_port"><code>ERR_CLOSED_MESSAGE_PORT</code></a></li> 205<li><a href="#errors_err_console_writable_stream"><code>ERR_CONSOLE_WRITABLE_STREAM</code></a></li> 206<li><a href="#errors_err_construct_call_invalid"><code>ERR_CONSTRUCT_CALL_INVALID</code></a></li> 207<li><a href="#errors_err_construct_call_required"><code>ERR_CONSTRUCT_CALL_REQUIRED</code></a></li> 208<li><a href="#errors_err_context_not_initialized"><code>ERR_CONTEXT_NOT_INITIALIZED</code></a></li> 209<li><a href="#errors_err_cpu_usage"><code>ERR_CPU_USAGE</code></a></li> 210<li><a href="#errors_err_crypto_custom_engine_not_supported"><code>ERR_CRYPTO_CUSTOM_ENGINE_NOT_SUPPORTED</code></a></li> 211<li><a href="#errors_err_crypto_ecdh_invalid_format"><code>ERR_CRYPTO_ECDH_INVALID_FORMAT</code></a></li> 212<li><a href="#errors_err_crypto_ecdh_invalid_public_key"><code>ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY</code></a></li> 213<li><a href="#errors_err_crypto_engine_unknown"><code>ERR_CRYPTO_ENGINE_UNKNOWN</code></a></li> 214<li><a href="#errors_err_crypto_fips_forced"><code>ERR_CRYPTO_FIPS_FORCED</code></a></li> 215<li><a href="#errors_err_crypto_fips_unavailable"><code>ERR_CRYPTO_FIPS_UNAVAILABLE</code></a></li> 216<li><a href="#errors_err_crypto_hash_finalized"><code>ERR_CRYPTO_HASH_FINALIZED</code></a></li> 217<li><a href="#errors_err_crypto_hash_update_failed"><code>ERR_CRYPTO_HASH_UPDATE_FAILED</code></a></li> 218<li><a href="#errors_err_crypto_incompatible_key"><code>ERR_CRYPTO_INCOMPATIBLE_KEY</code></a></li> 219<li><a href="#errors_err_crypto_incompatible_key_options"><code>ERR_CRYPTO_INCOMPATIBLE_KEY_OPTIONS</code></a></li> 220<li><a href="#errors_err_crypto_invalid_digest"><code>ERR_CRYPTO_INVALID_DIGEST</code></a></li> 221<li><a href="#errors_err_crypto_invalid_key_object_type"><code>ERR_CRYPTO_INVALID_KEY_OBJECT_TYPE</code></a></li> 222<li><a href="#errors_err_crypto_invalid_state"><code>ERR_CRYPTO_INVALID_STATE</code></a></li> 223<li><a href="#errors_err_crypto_pbkdf2_error"><code>ERR_CRYPTO_PBKDF2_ERROR</code></a></li> 224<li><a href="#errors_err_crypto_scrypt_invalid_parameter"><code>ERR_CRYPTO_SCRYPT_INVALID_PARAMETER</code></a></li> 225<li><a href="#errors_err_crypto_scrypt_not_supported"><code>ERR_CRYPTO_SCRYPT_NOT_SUPPORTED</code></a></li> 226<li><a href="#errors_err_crypto_sign_key_required"><code>ERR_CRYPTO_SIGN_KEY_REQUIRED</code></a></li> 227<li><a href="#errors_err_crypto_timing_safe_equal_length"><code>ERR_CRYPTO_TIMING_SAFE_EQUAL_LENGTH</code></a></li> 228<li><a href="#errors_err_crypto_unknown_cipher"><code>ERR_CRYPTO_UNKNOWN_CIPHER</code></a></li> 229<li><a href="#errors_err_crypto_unknown_dh_group"><code>ERR_CRYPTO_UNKNOWN_DH_GROUP</code></a></li> 230<li><a href="#errors_err_dlopen_disabled"><code>ERR_DLOPEN_DISABLED</code></a></li> 231<li><a href="#errors_err_dlopen_failed"><code>ERR_DLOPEN_FAILED</code></a></li> 232<li><a href="#errors_err_debugger_error"><code>ERR_DEBUGGER_ERROR</code></a></li> 233<li><a href="#errors_err_debugger_startup_error"><code>ERR_DEBUGGER_STARTUP_ERROR</code></a></li> 234<li><a href="#errors_err_dir_closed"><code>ERR_DIR_CLOSED</code></a></li> 235<li><a href="#errors_err_dir_concurrent_operation"><code>ERR_DIR_CONCURRENT_OPERATION</code></a></li> 236<li><a href="#errors_err_dns_set_servers_failed"><code>ERR_DNS_SET_SERVERS_FAILED</code></a></li> 237<li><a href="#errors_err_domain_callback_not_available"><code>ERR_DOMAIN_CALLBACK_NOT_AVAILABLE</code></a></li> 238<li><a href="#errors_err_domain_cannot_set_uncaught_exception_capture"><code>ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE</code></a></li> 239<li><a href="#errors_err_encoding_invalid_encoded_data"><code>ERR_ENCODING_INVALID_ENCODED_DATA</code></a></li> 240<li><a href="#errors_err_encoding_not_supported"><code>ERR_ENCODING_NOT_SUPPORTED</code></a></li> 241<li><a href="#errors_err_eval_esm_cannot_print"><code>ERR_EVAL_ESM_CANNOT_PRINT</code></a></li> 242<li><a href="#errors_err_event_recursion"><code>ERR_EVENT_RECURSION</code></a></li> 243<li><a href="#errors_err_execution_environment_not_available"><code>ERR_EXECUTION_ENVIRONMENT_NOT_AVAILABLE</code></a></li> 244<li><a href="#errors_err_falsy_value_rejection"><code>ERR_FALSY_VALUE_REJECTION</code></a></li> 245<li><a href="#errors_err_feature_unavailable_on_platform"><code>ERR_FEATURE_UNAVAILABLE_ON_PLATFORM</code></a></li> 246<li><a href="#errors_err_fs_eisdir"><code>ERR_FS_EISDIR</code></a></li> 247<li><a href="#errors_err_fs_file_too_large"><code>ERR_FS_FILE_TOO_LARGE</code></a></li> 248<li><a href="#errors_err_fs_invalid_symlink_type"><code>ERR_FS_INVALID_SYMLINK_TYPE</code></a></li> 249<li><a href="#errors_err_http_headers_sent"><code>ERR_HTTP_HEADERS_SENT</code></a></li> 250<li><a href="#errors_err_http_invalid_header_value"><code>ERR_HTTP_INVALID_HEADER_VALUE</code></a></li> 251<li><a href="#errors_err_http_invalid_status_code"><code>ERR_HTTP_INVALID_STATUS_CODE</code></a></li> 252<li><a href="#errors_err_http_trailer_invalid"><code>ERR_HTTP_TRAILER_INVALID</code></a></li> 253<li><a href="#errors_err_http2_altsvc_invalid_origin"><code>ERR_HTTP2_ALTSVC_INVALID_ORIGIN</code></a></li> 254<li><a href="#errors_err_http2_altsvc_length"><code>ERR_HTTP2_ALTSVC_LENGTH</code></a></li> 255<li><a href="#errors_err_http2_connect_authority"><code>ERR_HTTP2_CONNECT_AUTHORITY</code></a></li> 256<li><a href="#errors_err_http2_connect_path"><code>ERR_HTTP2_CONNECT_PATH</code></a></li> 257<li><a href="#errors_err_http2_connect_scheme"><code>ERR_HTTP2_CONNECT_SCHEME</code></a></li> 258<li><a href="#errors_err_http2_error"><code>ERR_HTTP2_ERROR</code></a></li> 259<li><a href="#errors_err_http2_goaway_session"><code>ERR_HTTP2_GOAWAY_SESSION</code></a></li> 260<li><a href="#errors_err_http2_header_single_value"><code>ERR_HTTP2_HEADER_SINGLE_VALUE</code></a></li> 261<li><a href="#errors_err_http2_headers_after_respond"><code>ERR_HTTP2_HEADERS_AFTER_RESPOND</code></a></li> 262<li><a href="#errors_err_http2_headers_sent"><code>ERR_HTTP2_HEADERS_SENT</code></a></li> 263<li><a href="#errors_err_http2_info_status_not_allowed"><code>ERR_HTTP2_INFO_STATUS_NOT_ALLOWED</code></a></li> 264<li><a href="#errors_err_http2_invalid_connection_headers"><code>ERR_HTTP2_INVALID_CONNECTION_HEADERS</code></a></li> 265<li><a href="#errors_err_http2_invalid_header_value"><code>ERR_HTTP2_INVALID_HEADER_VALUE</code></a></li> 266<li><a href="#errors_err_http2_invalid_info_status"><code>ERR_HTTP2_INVALID_INFO_STATUS</code></a></li> 267<li><a href="#errors_err_http2_invalid_origin"><code>ERR_HTTP2_INVALID_ORIGIN</code></a></li> 268<li><a href="#errors_err_http2_invalid_packed_settings_length"><code>ERR_HTTP2_INVALID_PACKED_SETTINGS_LENGTH</code></a></li> 269<li><a href="#errors_err_http2_invalid_pseudoheader"><code>ERR_HTTP2_INVALID_PSEUDOHEADER</code></a></li> 270<li><a href="#errors_err_http2_invalid_session"><code>ERR_HTTP2_INVALID_SESSION</code></a></li> 271<li><a href="#errors_err_http2_invalid_setting_value"><code>ERR_HTTP2_INVALID_SETTING_VALUE</code></a></li> 272<li><a href="#errors_err_http2_invalid_stream"><code>ERR_HTTP2_INVALID_STREAM</code></a></li> 273<li><a href="#errors_err_http2_max_pending_settings_ack"><code>ERR_HTTP2_MAX_PENDING_SETTINGS_ACK</code></a></li> 274<li><a href="#errors_err_http2_nested_push"><code>ERR_HTTP2_NESTED_PUSH</code></a></li> 275<li><a href="#errors_err_http2_no_mem"><code>ERR_HTTP2_NO_MEM</code></a></li> 276<li><a href="#errors_err_http2_no_socket_manipulation"><code>ERR_HTTP2_NO_SOCKET_MANIPULATION</code></a></li> 277<li><a href="#errors_err_http2_origin_length"><code>ERR_HTTP2_ORIGIN_LENGTH</code></a></li> 278<li><a href="#errors_err_http2_out_of_streams"><code>ERR_HTTP2_OUT_OF_STREAMS</code></a></li> 279<li><a href="#errors_err_http2_payload_forbidden"><code>ERR_HTTP2_PAYLOAD_FORBIDDEN</code></a></li> 280<li><a href="#errors_err_http2_ping_cancel"><code>ERR_HTTP2_PING_CANCEL</code></a></li> 281<li><a href="#errors_err_http2_ping_length"><code>ERR_HTTP2_PING_LENGTH</code></a></li> 282<li><a href="#errors_err_http2_pseudoheader_not_allowed"><code>ERR_HTTP2_PSEUDOHEADER_NOT_ALLOWED</code></a></li> 283<li><a href="#errors_err_http2_push_disabled"><code>ERR_HTTP2_PUSH_DISABLED</code></a></li> 284<li><a href="#errors_err_http2_send_file"><code>ERR_HTTP2_SEND_FILE</code></a></li> 285<li><a href="#errors_err_http2_send_file_noseek"><code>ERR_HTTP2_SEND_FILE_NOSEEK</code></a></li> 286<li><a href="#errors_err_http2_session_error"><code>ERR_HTTP2_SESSION_ERROR</code></a></li> 287<li><a href="#errors_err_http2_settings_cancel"><code>ERR_HTTP2_SETTINGS_CANCEL</code></a></li> 288<li><a href="#errors_err_http2_socket_bound"><code>ERR_HTTP2_SOCKET_BOUND</code></a></li> 289<li><a href="#errors_err_http2_socket_unbound"><code>ERR_HTTP2_SOCKET_UNBOUND</code></a></li> 290<li><a href="#errors_err_http2_status_101"><code>ERR_HTTP2_STATUS_101</code></a></li> 291<li><a href="#errors_err_http2_status_invalid"><code>ERR_HTTP2_STATUS_INVALID</code></a></li> 292<li><a href="#errors_err_http2_stream_cancel"><code>ERR_HTTP2_STREAM_CANCEL</code></a></li> 293<li><a href="#errors_err_http2_stream_error"><code>ERR_HTTP2_STREAM_ERROR</code></a></li> 294<li><a href="#errors_err_http2_stream_self_dependency"><code>ERR_HTTP2_STREAM_SELF_DEPENDENCY</code></a></li> 295<li><a href="#errors_err_http2_trailers_already_sent"><code>ERR_HTTP2_TRAILERS_ALREADY_SENT</code></a></li> 296<li><a href="#errors_err_http2_trailers_not_ready"><code>ERR_HTTP2_TRAILERS_NOT_READY</code></a></li> 297<li><a href="#errors_err_http2_unsupported_protocol"><code>ERR_HTTP2_UNSUPPORTED_PROTOCOL</code></a></li> 298<li><a href="#errors_err_incompatible_option_pair"><code>ERR_INCOMPATIBLE_OPTION_PAIR</code></a></li> 299<li><span class="stability_1"><a href="#errors_err_input_type_not_allowed"><code>ERR_INPUT_TYPE_NOT_ALLOWED</code></a></span></li> 300<li><a href="#errors_err_inspector_already_activated"><code>ERR_INSPECTOR_ALREADY_ACTIVATED</code></a></li> 301<li><a href="#errors_err_inspector_already_connected"><code>ERR_INSPECTOR_ALREADY_CONNECTED</code></a></li> 302<li><a href="#errors_err_inspector_closed"><code>ERR_INSPECTOR_CLOSED</code></a></li> 303<li><a href="#errors_err_inspector_command"><code>ERR_INSPECTOR_COMMAND</code></a></li> 304<li><a href="#errors_err_inspector_not_active"><code>ERR_INSPECTOR_NOT_ACTIVE</code></a></li> 305<li><a href="#errors_err_inspector_not_available"><code>ERR_INSPECTOR_NOT_AVAILABLE</code></a></li> 306<li><a href="#errors_err_inspector_not_connected"><code>ERR_INSPECTOR_NOT_CONNECTED</code></a></li> 307<li><a href="#errors_err_inspector_not_worker"><code>ERR_INSPECTOR_NOT_WORKER</code></a></li> 308<li><a href="#errors_err_internal_assertion"><code>ERR_INTERNAL_ASSERTION</code></a></li> 309<li><a href="#errors_err_invalid_address_family"><code>ERR_INVALID_ADDRESS_FAMILY</code></a></li> 310<li><a href="#errors_err_invalid_arg_type"><code>ERR_INVALID_ARG_TYPE</code></a></li> 311<li><a href="#errors_err_invalid_arg_value"><code>ERR_INVALID_ARG_VALUE</code></a></li> 312<li><a href="#errors_err_invalid_async_id"><code>ERR_INVALID_ASYNC_ID</code></a></li> 313<li><a href="#errors_err_invalid_buffer_size"><code>ERR_INVALID_BUFFER_SIZE</code></a></li> 314<li><a href="#errors_err_invalid_callback"><code>ERR_INVALID_CALLBACK</code></a></li> 315<li><a href="#errors_err_invalid_char"><code>ERR_INVALID_CHAR</code></a></li> 316<li><a href="#errors_err_invalid_cursor_pos"><code>ERR_INVALID_CURSOR_POS</code></a></li> 317<li><a href="#errors_err_invalid_fd"><code>ERR_INVALID_FD</code></a></li> 318<li><a href="#errors_err_invalid_fd_type"><code>ERR_INVALID_FD_TYPE</code></a></li> 319<li><a href="#errors_err_invalid_file_url_host"><code>ERR_INVALID_FILE_URL_HOST</code></a></li> 320<li><a href="#errors_err_invalid_file_url_path"><code>ERR_INVALID_FILE_URL_PATH</code></a></li> 321<li><a href="#errors_err_invalid_handle_type"><code>ERR_INVALID_HANDLE_TYPE</code></a></li> 322<li><a href="#errors_err_invalid_http_token"><code>ERR_INVALID_HTTP_TOKEN</code></a></li> 323<li><a href="#errors_err_invalid_ip_address"><code>ERR_INVALID_IP_ADDRESS</code></a></li> 324<li><a href="#errors_err_invalid_module"><code>ERR_INVALID_MODULE</code></a></li> 325<li><a href="#errors_err_invalid_module_specifier"><code>ERR_INVALID_MODULE_SPECIFIER</code></a></li> 326<li><a href="#errors_err_invalid_opt_value"><code>ERR_INVALID_OPT_VALUE</code></a></li> 327<li><a href="#errors_err_invalid_opt_value_encoding"><code>ERR_INVALID_OPT_VALUE_ENCODING</code></a></li> 328<li><a href="#errors_err_invalid_package_config"><code>ERR_INVALID_PACKAGE_CONFIG</code></a></li> 329<li><a href="#errors_err_invalid_package_target"><code>ERR_INVALID_PACKAGE_TARGET</code></a></li> 330<li><a href="#errors_err_invalid_performance_mark"><code>ERR_INVALID_PERFORMANCE_MARK</code></a></li> 331<li><a href="#errors_err_invalid_protocol"><code>ERR_INVALID_PROTOCOL</code></a></li> 332<li><a href="#errors_err_invalid_repl_eval_config"><code>ERR_INVALID_REPL_EVAL_CONFIG</code></a></li> 333<li><a href="#errors_err_invalid_repl_input"><code>ERR_INVALID_REPL_INPUT</code></a></li> 334<li><a href="#errors_err_invalid_return_property"><code>ERR_INVALID_RETURN_PROPERTY</code></a></li> 335<li><a href="#errors_err_invalid_return_property_value"><code>ERR_INVALID_RETURN_PROPERTY_VALUE</code></a></li> 336<li><a href="#errors_err_invalid_return_value"><code>ERR_INVALID_RETURN_VALUE</code></a></li> 337<li><a href="#errors_err_invalid_sync_fork_input"><code>ERR_INVALID_SYNC_FORK_INPUT</code></a></li> 338<li><a href="#errors_err_invalid_this"><code>ERR_INVALID_THIS</code></a></li> 339<li><a href="#errors_err_invalid_transfer_object"><code>ERR_INVALID_TRANSFER_OBJECT</code></a></li> 340<li><a href="#errors_err_invalid_tuple"><code>ERR_INVALID_TUPLE</code></a></li> 341<li><a href="#errors_err_invalid_uri"><code>ERR_INVALID_URI</code></a></li> 342<li><a href="#errors_err_invalid_url"><code>ERR_INVALID_URL</code></a></li> 343<li><a href="#errors_err_invalid_url_scheme"><code>ERR_INVALID_URL_SCHEME</code></a></li> 344<li><a href="#errors_err_ipc_channel_closed"><code>ERR_IPC_CHANNEL_CLOSED</code></a></li> 345<li><a href="#errors_err_ipc_disconnected"><code>ERR_IPC_DISCONNECTED</code></a></li> 346<li><a href="#errors_err_ipc_one_pipe"><code>ERR_IPC_ONE_PIPE</code></a></li> 347<li><a href="#errors_err_ipc_sync_fork"><code>ERR_IPC_SYNC_FORK</code></a></li> 348<li><a href="#errors_err_manifest_assert_integrity"><code>ERR_MANIFEST_ASSERT_INTEGRITY</code></a></li> 349<li><a href="#errors_err_manifest_dependency_missing"><code>ERR_MANIFEST_DEPENDENCY_MISSING</code></a></li> 350<li><a href="#errors_err_manifest_integrity_mismatch"><code>ERR_MANIFEST_INTEGRITY_MISMATCH</code></a></li> 351<li><a href="#errors_err_manifest_invalid_resource_field"><code>ERR_MANIFEST_INVALID_RESOURCE_FIELD</code></a></li> 352<li><a href="#errors_err_manifest_invalid_specifier"><code>ERR_MANIFEST_INVALID_SPECIFIER</code></a></li> 353<li><a href="#errors_err_manifest_parse_policy"><code>ERR_MANIFEST_PARSE_POLICY</code></a></li> 354<li><a href="#errors_err_manifest_tdz"><code>ERR_MANIFEST_TDZ</code></a></li> 355<li><a href="#errors_err_manifest_unknown_onerror"><code>ERR_MANIFEST_UNKNOWN_ONERROR</code></a></li> 356<li><a href="#errors_err_memory_allocation_failed"><code>ERR_MEMORY_ALLOCATION_FAILED</code></a></li> 357<li><a href="#errors_err_message_target_context_unavailable"><code>ERR_MESSAGE_TARGET_CONTEXT_UNAVAILABLE</code></a></li> 358<li><a href="#errors_err_method_not_implemented"><code>ERR_METHOD_NOT_IMPLEMENTED</code></a></li> 359<li><a href="#errors_err_missing_args"><code>ERR_MISSING_ARGS</code></a></li> 360<li><a href="#errors_err_missing_message_port_in_transfer_list"><code>ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST</code></a></li> 361<li><a href="#errors_err_missing_option"><code>ERR_MISSING_OPTION</code></a></li> 362<li><a href="#errors_err_missing_passphrase"><code>ERR_MISSING_PASSPHRASE</code></a></li> 363<li><a href="#errors_err_missing_platform_for_worker"><code>ERR_MISSING_PLATFORM_FOR_WORKER</code></a></li> 364<li><span class="stability_1"><a href="#errors_err_module_not_found"><code>ERR_MODULE_NOT_FOUND</code></a></span></li> 365<li><a href="#errors_err_multiple_callback"><code>ERR_MULTIPLE_CALLBACK</code></a></li> 366<li><a href="#errors_err_napi_cons_function"><code>ERR_NAPI_CONS_FUNCTION</code></a></li> 367<li><a href="#errors_err_napi_invalid_dataview_args"><code>ERR_NAPI_INVALID_DATAVIEW_ARGS</code></a></li> 368<li><a href="#errors_err_napi_invalid_typedarray_alignment"><code>ERR_NAPI_INVALID_TYPEDARRAY_ALIGNMENT</code></a></li> 369<li><a href="#errors_err_napi_invalid_typedarray_length"><code>ERR_NAPI_INVALID_TYPEDARRAY_LENGTH</code></a></li> 370<li><a href="#errors_err_napi_tsfn_call_js"><code>ERR_NAPI_TSFN_CALL_JS</code></a></li> 371<li><a href="#errors_err_napi_tsfn_get_undefined"><code>ERR_NAPI_TSFN_GET_UNDEFINED</code></a></li> 372<li><a href="#errors_err_napi_tsfn_start_idle_loop"><code>ERR_NAPI_TSFN_START_IDLE_LOOP</code></a></li> 373<li><a href="#errors_err_napi_tsfn_stop_idle_loop"><code>ERR_NAPI_TSFN_STOP_IDLE_LOOP</code></a></li> 374<li><a href="#errors_err_no_crypto"><code>ERR_NO_CRYPTO</code></a></li> 375<li><a href="#errors_err_no_icu"><code>ERR_NO_ICU</code></a></li> 376<li><a href="#errors_err_non_context_aware_disabled"><code>ERR_NON_CONTEXT_AWARE_DISABLED</code></a></li> 377<li><a href="#errors_err_operation_failed"><code>ERR_OPERATION_FAILED</code></a></li> 378<li><a href="#errors_err_out_of_range"><code>ERR_OUT_OF_RANGE</code></a></li> 379<li><a href="#errors_err_package_import_not_defined"><code>ERR_PACKAGE_IMPORT_NOT_DEFINED</code></a></li> 380<li><a href="#errors_err_package_path_not_exported"><code>ERR_PACKAGE_PATH_NOT_EXPORTED</code></a></li> 381<li><a href="#errors_err_proto_access"><code>ERR_PROTO_ACCESS</code></a></li> 382<li><span class="stability_1"><a href="#errors_err_require_esm"><code>ERR_REQUIRE_ESM</code></a></span></li> 383<li><a href="#errors_err_script_execution_interrupted"><code>ERR_SCRIPT_EXECUTION_INTERRUPTED</code></a></li> 384<li><a href="#errors_err_script_execution_timeout"><code>ERR_SCRIPT_EXECUTION_TIMEOUT</code></a></li> 385<li><a href="#errors_err_server_already_listen"><code>ERR_SERVER_ALREADY_LISTEN</code></a></li> 386<li><a href="#errors_err_server_not_running"><code>ERR_SERVER_NOT_RUNNING</code></a></li> 387<li><a href="#errors_err_socket_already_bound"><code>ERR_SOCKET_ALREADY_BOUND</code></a></li> 388<li><a href="#errors_err_socket_bad_buffer_size"><code>ERR_SOCKET_BAD_BUFFER_SIZE</code></a></li> 389<li><a href="#errors_err_socket_bad_port"><code>ERR_SOCKET_BAD_PORT</code></a></li> 390<li><a href="#errors_err_socket_bad_type"><code>ERR_SOCKET_BAD_TYPE</code></a></li> 391<li><a href="#errors_err_socket_buffer_size"><code>ERR_SOCKET_BUFFER_SIZE</code></a></li> 392<li><a href="#errors_err_socket_closed"><code>ERR_SOCKET_CLOSED</code></a></li> 393<li><a href="#errors_err_socket_dgram_is_connected"><code>ERR_SOCKET_DGRAM_IS_CONNECTED</code></a></li> 394<li><a href="#errors_err_socket_dgram_not_connected"><code>ERR_SOCKET_DGRAM_NOT_CONNECTED</code></a></li> 395<li><a href="#errors_err_socket_dgram_not_running"><code>ERR_SOCKET_DGRAM_NOT_RUNNING</code></a></li> 396<li><a href="#errors_err_sri_parse"><code>ERR_SRI_PARSE</code></a></li> 397<li><a href="#errors_err_stream_already_finished"><code>ERR_STREAM_ALREADY_FINISHED</code></a></li> 398<li><a href="#errors_err_stream_cannot_pipe"><code>ERR_STREAM_CANNOT_PIPE</code></a></li> 399<li><a href="#errors_err_stream_destroyed"><code>ERR_STREAM_DESTROYED</code></a></li> 400<li><a href="#errors_err_stream_null_values"><code>ERR_STREAM_NULL_VALUES</code></a></li> 401<li><a href="#errors_err_stream_premature_close"><code>ERR_STREAM_PREMATURE_CLOSE</code></a></li> 402<li><a href="#errors_err_stream_push_after_eof"><code>ERR_STREAM_PUSH_AFTER_EOF</code></a></li> 403<li><a href="#errors_err_stream_unshift_after_end_event"><code>ERR_STREAM_UNSHIFT_AFTER_END_EVENT</code></a></li> 404<li><a href="#errors_err_stream_wrap"><code>ERR_STREAM_WRAP</code></a></li> 405<li><a href="#errors_err_stream_write_after_end"><code>ERR_STREAM_WRITE_AFTER_END</code></a></li> 406<li><a href="#errors_err_string_too_long"><code>ERR_STRING_TOO_LONG</code></a></li> 407<li><a href="#errors_err_synthetic"><code>ERR_SYNTHETIC</code></a></li> 408<li><a href="#errors_err_system_error"><code>ERR_SYSTEM_ERROR</code></a></li> 409<li><a href="#errors_err_tls_cert_altname_format"><code>ERR_TLS_CERT_ALTNAME_FORMAT</code></a></li> 410<li><a href="#errors_err_tls_cert_altname_invalid"><code>ERR_TLS_CERT_ALTNAME_INVALID</code></a></li> 411<li><a href="#errors_err_tls_dh_param_size"><code>ERR_TLS_DH_PARAM_SIZE</code></a></li> 412<li><a href="#errors_err_tls_handshake_timeout"><code>ERR_TLS_HANDSHAKE_TIMEOUT</code></a></li> 413<li><a href="#errors_err_tls_invalid_context"><code>ERR_TLS_INVALID_CONTEXT</code></a></li> 414<li><a href="#errors_err_tls_invalid_protocol_method"><code>ERR_TLS_INVALID_PROTOCOL_METHOD</code></a></li> 415<li><a href="#errors_err_tls_invalid_protocol_version"><code>ERR_TLS_INVALID_PROTOCOL_VERSION</code></a></li> 416<li><a href="#errors_err_tls_invalid_state"><code>ERR_TLS_INVALID_STATE</code></a></li> 417<li><a href="#errors_err_tls_protocol_version_conflict"><code>ERR_TLS_PROTOCOL_VERSION_CONFLICT</code></a></li> 418<li><a href="#errors_err_tls_psk_set_identiy_hint_failed"><code>ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED</code></a></li> 419<li><a href="#errors_err_tls_renegotiation_disabled"><code>ERR_TLS_RENEGOTIATION_DISABLED</code></a></li> 420<li><a href="#errors_err_tls_required_server_name"><code>ERR_TLS_REQUIRED_SERVER_NAME</code></a></li> 421<li><a href="#errors_err_tls_session_attack"><code>ERR_TLS_SESSION_ATTACK</code></a></li> 422<li><a href="#errors_err_tls_sni_from_server"><code>ERR_TLS_SNI_FROM_SERVER</code></a></li> 423<li><a href="#errors_err_trace_events_category_required"><code>ERR_TRACE_EVENTS_CATEGORY_REQUIRED</code></a></li> 424<li><a href="#errors_err_trace_events_unavailable"><code>ERR_TRACE_EVENTS_UNAVAILABLE</code></a></li> 425<li><a href="#errors_err_transform_already_transforming"><code>ERR_TRANSFORM_ALREADY_TRANSFORMING</code></a></li> 426<li><a href="#errors_err_transform_with_length_0"><code>ERR_TRANSFORM_WITH_LENGTH_0</code></a></li> 427<li><a href="#errors_err_tty_init_failed"><code>ERR_TTY_INIT_FAILED</code></a></li> 428<li><a href="#errors_err_unavailable_during_exit"><code>ERR_UNAVAILABLE_DURING_EXIT</code></a></li> 429<li><a href="#errors_err_uncaught_exception_capture_already_set"><code>ERR_UNCAUGHT_EXCEPTION_CAPTURE_ALREADY_SET</code></a></li> 430<li><a href="#errors_err_unescaped_characters"><code>ERR_UNESCAPED_CHARACTERS</code></a></li> 431<li><a href="#errors_err_unhandled_error"><code>ERR_UNHANDLED_ERROR</code></a></li> 432<li><a href="#errors_err_unknown_builtin_module"><code>ERR_UNKNOWN_BUILTIN_MODULE</code></a></li> 433<li><a href="#errors_err_unknown_credential"><code>ERR_UNKNOWN_CREDENTIAL</code></a></li> 434<li><a href="#errors_err_unknown_encoding"><code>ERR_UNKNOWN_ENCODING</code></a></li> 435<li><span class="stability_1"><a href="#errors_err_unknown_file_extension"><code>ERR_UNKNOWN_FILE_EXTENSION</code></a></span></li> 436<li><span class="stability_1"><a href="#errors_err_unknown_module_format"><code>ERR_UNKNOWN_MODULE_FORMAT</code></a></span></li> 437<li><a href="#errors_err_unknown_signal"><code>ERR_UNKNOWN_SIGNAL</code></a></li> 438<li><a href="#errors_err_unsupported_dir_import"><code>ERR_UNSUPPORTED_DIR_IMPORT</code></a></li> 439<li><a href="#errors_err_unsupported_esm_url_scheme"><code>ERR_UNSUPPORTED_ESM_URL_SCHEME</code></a></li> 440<li><a href="#errors_err_valid_performance_entry_type"><code>ERR_VALID_PERFORMANCE_ENTRY_TYPE</code></a></li> 441<li><a href="#errors_err_vm_dynamic_import_callback_missing"><code>ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING</code></a></li> 442<li><a href="#errors_err_vm_module_already_linked"><code>ERR_VM_MODULE_ALREADY_LINKED</code></a></li> 443<li><a href="#errors_err_vm_module_cached_data_rejected"><code>ERR_VM_MODULE_CACHED_DATA_REJECTED</code></a></li> 444<li><a href="#errors_err_vm_module_cannot_create_cached_data"><code>ERR_VM_MODULE_CANNOT_CREATE_CACHED_DATA</code></a></li> 445<li><a href="#errors_err_vm_module_different_context"><code>ERR_VM_MODULE_DIFFERENT_CONTEXT</code></a></li> 446<li><a href="#errors_err_vm_module_linking_errored"><code>ERR_VM_MODULE_LINKING_ERRORED</code></a></li> 447<li><a href="#errors_err_vm_module_link_failure"><code>ERR_VM_MODULE_LINK_FAILURE</code></a></li> 448<li><a href="#errors_err_vm_module_not_module"><code>ERR_VM_MODULE_NOT_MODULE</code></a></li> 449<li><a href="#errors_err_vm_module_status"><code>ERR_VM_MODULE_STATUS</code></a></li> 450<li><a href="#errors_err_wasi_already_started"><code>ERR_WASI_ALREADY_STARTED</code></a></li> 451<li><a href="#errors_err_wasi_not_started"><code>ERR_WASI_NOT_STARTED</code></a></li> 452<li><a href="#errors_err_worker_init_failed"><code>ERR_WORKER_INIT_FAILED</code></a></li> 453<li><a href="#errors_err_worker_invalid_exec_argv"><code>ERR_WORKER_INVALID_EXEC_ARGV</code></a></li> 454<li><a href="#errors_err_worker_not_running"><code>ERR_WORKER_NOT_RUNNING</code></a></li> 455<li><a href="#errors_err_worker_out_of_memory"><code>ERR_WORKER_OUT_OF_MEMORY</code></a></li> 456<li><a href="#errors_err_worker_path"><code>ERR_WORKER_PATH</code></a></li> 457<li><a href="#errors_err_worker_unserializable_error"><code>ERR_WORKER_UNSERIALIZABLE_ERROR</code></a></li> 458<li><a href="#errors_err_worker_unsupported_extension"><code>ERR_WORKER_UNSUPPORTED_EXTENSION</code></a></li> 459<li><a href="#errors_err_worker_unsupported_operation"><code>ERR_WORKER_UNSUPPORTED_OPERATION</code></a></li> 460<li><a href="#errors_err_zlib_initialization_failed"><code>ERR_ZLIB_INITIALIZATION_FAILED</code></a></li> 461<li><a href="#errors_hpe_header_overflow"><code>HPE_HEADER_OVERFLOW</code></a></li> 462<li><a href="#errors_hpe_unexpected_content_length"><code>HPE_UNEXPECTED_CONTENT_LENGTH</code></a></li> 463<li><a href="#errors_module_not_found"><code>MODULE_NOT_FOUND</code></a></li> 464</ul> 465</li> 466<li><span class="stability_0"><a href="#errors_legacy_node_js_error_codes">Legacy Node.js error codes</a></span> 467<ul> 468<li><a href="#errors_err_cannot_transfer_object"><code>ERR_CANNOT_TRANSFER_OBJECT</code></a></li> 469<li><a href="#errors_err_crypto_hash_digest_no_utf16"><code>ERR_CRYPTO_HASH_DIGEST_NO_UTF16</code></a></li> 470<li><a href="#errors_err_http2_frame_error"><code>ERR_HTTP2_FRAME_ERROR</code></a></li> 471<li><a href="#errors_err_http2_headers_object"><code>ERR_HTTP2_HEADERS_OBJECT</code></a></li> 472<li><a href="#errors_err_http2_header_required"><code>ERR_HTTP2_HEADER_REQUIRED</code></a></li> 473<li><a href="#errors_err_http2_info_headers_after_respond"><code>ERR_HTTP2_INFO_HEADERS_AFTER_RESPOND</code></a></li> 474<li><a href="#errors_err_http2_stream_closed"><code>ERR_HTTP2_STREAM_CLOSED</code></a></li> 475<li><a href="#errors_err_http_invalid_char"><code>ERR_HTTP_INVALID_CHAR</code></a></li> 476<li><a href="#errors_err_http_request_timeout"><code>ERR_HTTP_REQUEST_TIMEOUT</code></a></li> 477<li><a href="#errors_err_index_out_of_range"><code>ERR_INDEX_OUT_OF_RANGE</code></a></li> 478<li><a href="#errors_err_napi_cons_prototype_object"><code>ERR_NAPI_CONS_PROTOTYPE_OBJECT</code></a></li> 479<li><a href="#errors_err_no_longer_supported"><code>ERR_NO_LONGER_SUPPORTED</code></a></li> 480<li><a href="#errors_err_outofmemory"><code>ERR_OUTOFMEMORY</code></a></li> 481<li><a href="#errors_err_parse_history_data"><code>ERR_PARSE_HISTORY_DATA</code></a></li> 482<li><a href="#errors_err_socket_cannot_send"><code>ERR_SOCKET_CANNOT_SEND</code></a></li> 483<li><a href="#errors_err_stderr_close"><code>ERR_STDERR_CLOSE</code></a></li> 484<li><a href="#errors_err_stdout_close"><code>ERR_STDOUT_CLOSE</code></a></li> 485<li><a href="#errors_err_stream_read_not_implemented"><code>ERR_STREAM_READ_NOT_IMPLEMENTED</code></a></li> 486<li><a href="#errors_err_tls_renegotiation_failed"><code>ERR_TLS_RENEGOTIATION_FAILED</code></a></li> 487<li><a href="#errors_err_transferring_externalized_sharedarraybuffer"><code>ERR_TRANSFERRING_EXTERNALIZED_SHAREDARRAYBUFFER</code></a></li> 488<li><a href="#errors_err_unknown_stdin_type"><code>ERR_UNKNOWN_STDIN_TYPE</code></a></li> 489<li><a href="#errors_err_unknown_stream_type"><code>ERR_UNKNOWN_STREAM_TYPE</code></a></li> 490<li><a href="#errors_err_v8breakiterator"><code>ERR_V8BREAKITERATOR</code></a></li> 491<li><a href="#errors_err_value_out_of_range"><code>ERR_VALUE_OUT_OF_RANGE</code></a></li> 492<li><a href="#errors_err_vm_module_not_linked"><code>ERR_VM_MODULE_NOT_LINKED</code></a></li> 493<li><a href="#errors_err_zlib_binding_closed"><code>ERR_ZLIB_BINDING_CLOSED</code></a></li> 494</ul> 495</li> 496</ul> 497</li> 498</ul></details> 499 500 <div id="apicontent"> 501 <h2>Errors<span><a class="mark" href="#errors_errors" id="errors_errors">#</a></span></h2> 502 503 504<p>Applications running in Node.js will generally experience four categories of 505errors:</p> 506<ul> 507<li>Standard JavaScript errors such as <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError" class="type"><EvalError></a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError" class="type"><SyntaxError></a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError" class="type"><RangeError></a>, 508<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError" class="type"><ReferenceError></a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError" class="type"><TypeError></a>, and <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError" class="type"><URIError></a>.</li> 509<li>System errors triggered by underlying operating system constraints such 510as attempting to open a file that does not exist or attempting to send data 511over a closed socket.</li> 512<li>User-specified errors triggered by application code.</li> 513<li><code>AssertionError</code>s are a special class of error that can be triggered when 514Node.js detects an exceptional logic violation that should never occur. These 515are raised typically by the <code>assert</code> module.</li> 516</ul> 517<p>All JavaScript and system errors raised by Node.js inherit from, or are 518instances of, the standard JavaScript <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a> class and are guaranteed 519to provide <em>at least</em> the properties available on that class.</p> 520<section><h3>Error propagation and interception<span><a class="mark" href="#errors_error_propagation_and_interception" id="errors_error_propagation_and_interception">#</a></span></h3> 521 522<p>Node.js supports several mechanisms for propagating and handling errors that 523occur while an application is running. How these errors are reported and 524handled depends entirely on the type of <code>Error</code> and the style of the API that is 525called.</p> 526<p>All JavaScript errors are handled as exceptions that <em>immediately</em> generate 527and throw an error using the standard JavaScript <code>throw</code> mechanism. These 528are handled using the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch"><code>try…catch</code> construct</a> provided by the 529JavaScript language.</p> 530<pre><code class="language-js"><span class="hljs-comment">// Throws with a ReferenceError because z is not defined.</span> 531<span class="hljs-keyword">try</span> { 532 <span class="hljs-keyword">const</span> m = <span class="hljs-number">1</span>; 533 <span class="hljs-keyword">const</span> n = m + z; 534} <span class="hljs-keyword">catch</span> (err) { 535 <span class="hljs-comment">// Handle the error here.</span> 536}</code></pre> 537<p>Any use of the JavaScript <code>throw</code> mechanism will raise an exception that 538<em>must</em> be handled using <code>try…catch</code> or the Node.js process will exit 539immediately.</p> 540<p>With few exceptions, <em>Synchronous</em> APIs (any blocking method that does not 541accept a <code>callback</code> function, such as <a href="fs.html#fs_fs_readfilesync_path_options"><code>fs.readFileSync</code></a>), will use <code>throw</code> 542to report errors.</p> 543<p>Errors that occur within <em>Asynchronous APIs</em> may be reported in multiple ways:</p> 544<ul> 545<li>Most asynchronous methods that accept a <code>callback</code> function will accept an 546<code>Error</code> object passed as the first argument to that function. If that first 547argument is not <code>null</code> and is an instance of <code>Error</code>, then an error occurred 548that should be handled.</li> 549</ul> 550<!-- eslint-disable no-useless-return --> 551<pre><code class="language-js"><span class="hljs-keyword">const</span> fs = <span class="hljs-built_in">require</span>(<span class="hljs-string">'fs'</span>); 552fs.<span class="hljs-title function_">readFile</span>(<span class="hljs-string">'a file that does not exist'</span>, <span class="hljs-function">(<span class="hljs-params">err, data</span>) =></span> { 553 <span class="hljs-keyword">if</span> (err) { 554 <span class="hljs-variable language_">console</span>.<span class="hljs-title function_">error</span>(<span class="hljs-string">'There was an error reading the file!'</span>, err); 555 <span class="hljs-keyword">return</span>; 556 } 557 <span class="hljs-comment">// Otherwise handle the data</span> 558});</code></pre> 559<ul> 560<li> 561<p>When an asynchronous method is called on an object that is an 562<a href="events.html#events_class_eventemitter"><code>EventEmitter</code></a>, errors can be routed to that object's <code>'error'</code> event.</p> 563<pre><code class="language-js"><span class="hljs-keyword">const</span> net = <span class="hljs-built_in">require</span>(<span class="hljs-string">'net'</span>); 564<span class="hljs-keyword">const</span> connection = net.<span class="hljs-title function_">connect</span>(<span class="hljs-string">'localhost'</span>); 565 566<span class="hljs-comment">// Adding an 'error' event handler to a stream:</span> 567connection.<span class="hljs-title function_">on</span>(<span class="hljs-string">'error'</span>, <span class="hljs-function">(<span class="hljs-params">err</span>) =></span> { 568 <span class="hljs-comment">// If the connection is reset by the server, or if it can't</span> 569 <span class="hljs-comment">// connect at all, or on any sort of error encountered by</span> 570 <span class="hljs-comment">// the connection, the error will be sent here.</span> 571 <span class="hljs-variable language_">console</span>.<span class="hljs-title function_">error</span>(err); 572}); 573 574connection.<span class="hljs-title function_">pipe</span>(process.<span class="hljs-property">stdout</span>);</code></pre> 575</li> 576<li> 577<p>A handful of typically asynchronous methods in the Node.js API may still 578use the <code>throw</code> mechanism to raise exceptions that must be handled using 579<code>try…catch</code>. There is no comprehensive list of such methods; please 580refer to the documentation of each method to determine the appropriate 581error handling mechanism required.</p> 582</li> 583</ul> 584<p>The use of the <code>'error'</code> event mechanism is most common for <a href="stream.html">stream-based</a> 585and <a href="events.html#events_class_eventemitter">event emitter-based</a> APIs, which themselves represent a series of 586asynchronous operations over time (as opposed to a single operation that may 587pass or fail).</p> 588<p>For <em>all</em> <a href="events.html#events_class_eventemitter"><code>EventEmitter</code></a> objects, if an <code>'error'</code> event handler is not 589provided, the error will be thrown, causing the Node.js process to report an 590uncaught exception and crash unless either: The <a href="domain.html"><code>domain</code></a> module is 591used appropriately or a handler has been registered for the 592<a href="process.html#process_event_uncaughtexception"><code>'uncaughtException'</code></a> event.</p> 593<pre><code class="language-js"><span class="hljs-keyword">const</span> <span class="hljs-title class_">EventEmitter</span> = <span class="hljs-built_in">require</span>(<span class="hljs-string">'events'</span>); 594<span class="hljs-keyword">const</span> ee = <span class="hljs-keyword">new</span> <span class="hljs-title class_">EventEmitter</span>(); 595 596<span class="hljs-title function_">setImmediate</span>(<span class="hljs-function">() =></span> { 597 <span class="hljs-comment">// This will crash the process because no 'error' event</span> 598 <span class="hljs-comment">// handler has been added.</span> 599 ee.<span class="hljs-title function_">emit</span>(<span class="hljs-string">'error'</span>, <span class="hljs-keyword">new</span> <span class="hljs-title class_">Error</span>(<span class="hljs-string">'This will crash'</span>)); 600});</code></pre> 601<p>Errors generated in this way <em>cannot</em> be intercepted using <code>try…catch</code> as 602they are thrown <em>after</em> the calling code has already exited.</p> 603<p>Developers must refer to the documentation for each method to determine 604exactly how errors raised by those methods are propagated.</p> 605<h4>Error-first callbacks<span><a class="mark" href="#errors_error_first_callbacks" id="errors_error_first_callbacks">#</a></span></h4> 606 607<p>Most asynchronous methods exposed by the Node.js core API follow an idiomatic 608pattern referred to as an <em>error-first callback</em>. With this pattern, a callback 609function is passed to the method as an argument. When the operation either 610completes or an error is raised, the callback function is called with the 611<code>Error</code> object (if any) passed as the first argument. If no error was raised, 612the first argument will be passed as <code>null</code>.</p> 613<pre><code class="language-js"><span class="hljs-keyword">const</span> fs = <span class="hljs-built_in">require</span>(<span class="hljs-string">'fs'</span>); 614 615<span class="hljs-keyword">function</span> <span class="hljs-title function_">errorFirstCallback</span>(<span class="hljs-params">err, data</span>) { 616 <span class="hljs-keyword">if</span> (err) { 617 <span class="hljs-variable language_">console</span>.<span class="hljs-title function_">error</span>(<span class="hljs-string">'There was an error'</span>, err); 618 <span class="hljs-keyword">return</span>; 619 } 620 <span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(data); 621} 622 623fs.<span class="hljs-title function_">readFile</span>(<span class="hljs-string">'/some/file/that/does-not-exist'</span>, errorFirstCallback); 624fs.<span class="hljs-title function_">readFile</span>(<span class="hljs-string">'/some/file/that/does-exist'</span>, errorFirstCallback);</code></pre> 625<p>The JavaScript <code>try…catch</code> mechanism <strong>cannot</strong> be used to intercept errors 626generated by asynchronous APIs. A common mistake for beginners is to try to 627use <code>throw</code> inside an error-first callback:</p> 628<pre><code class="language-js"><span class="hljs-comment">// THIS WILL NOT WORK:</span> 629<span class="hljs-keyword">const</span> fs = <span class="hljs-built_in">require</span>(<span class="hljs-string">'fs'</span>); 630 631<span class="hljs-keyword">try</span> { 632 fs.<span class="hljs-title function_">readFile</span>(<span class="hljs-string">'/some/file/that/does-not-exist'</span>, <span class="hljs-function">(<span class="hljs-params">err, data</span>) =></span> { 633 <span class="hljs-comment">// Mistaken assumption: throwing here...</span> 634 <span class="hljs-keyword">if</span> (err) { 635 <span class="hljs-keyword">throw</span> err; 636 } 637 }); 638} <span class="hljs-keyword">catch</span> (err) { 639 <span class="hljs-comment">// This will not catch the throw!</span> 640 <span class="hljs-variable language_">console</span>.<span class="hljs-title function_">error</span>(err); 641}</code></pre> 642<p>This will not work because the callback function passed to <code>fs.readFile()</code> is 643called asynchronously. By the time the callback has been called, the 644surrounding code, including the <code>try…catch</code> block, will have already exited. 645Throwing an error inside the callback <strong>can crash the Node.js process</strong> in most 646cases. If <a href="domain.html">domains</a> are enabled, or a handler has been registered with 647<code>process.on('uncaughtException')</code>, such errors can be intercepted.</p> 648</section><section><h3>Class: <code>Error</code><span><a class="mark" href="#errors_class_error" id="errors_class_error">#</a></span></h3> 649 650<p>A generic JavaScript <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a> object that does not denote any specific 651circumstance of why the error occurred. <code>Error</code> objects capture a "stack trace" 652detailing the point in the code at which the <code>Error</code> was instantiated, and may 653provide a text description of the error.</p> 654<p>All errors generated by Node.js, including all system and JavaScript errors, 655will either be instances of, or inherit from, the <code>Error</code> class.</p> 656<h4><code>new Error(message)</code><span><a class="mark" href="#errors_new_error_message" id="errors_new_error_message">#</a></span></h4> 657<ul> 658<li><code>message</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> 659</ul> 660<p>Creates a new <code>Error</code> object and sets the <code>error.message</code> property to the 661provided text message. If an object is passed as <code>message</code>, the text message 662is generated by calling <code>message.toString()</code>. The <code>error.stack</code> property will 663represent the point in the code at which <code>new Error()</code> was called. Stack traces 664are dependent on <a href="https://github.com/v8/v8/wiki/Stack-Trace-API">V8's stack trace API</a>. Stack traces extend only to either 665(a) the beginning of <em>synchronous code execution</em>, or (b) the number of frames 666given by the property <code>Error.stackTraceLimit</code>, whichever is smaller.</p> 667<h4><code>Error.captureStackTrace(targetObject[, constructorOpt])</code><span><a class="mark" href="#errors_error_capturestacktrace_targetobject_constructoropt" id="errors_error_capturestacktrace_targetobject_constructoropt">#</a></span></h4> 668<ul> 669<li><code>targetObject</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a></li> 670<li><code>constructorOpt</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> 671</ul> 672<p>Creates a <code>.stack</code> property on <code>targetObject</code>, which when accessed returns 673a string representing the location in the code at which 674<code>Error.captureStackTrace()</code> was called.</p> 675<pre><code class="language-js"><span class="hljs-keyword">const</span> myObject = {}; 676<span class="hljs-title class_">Error</span>.<span class="hljs-title function_">captureStackTrace</span>(myObject); 677myObject.<span class="hljs-property">stack</span>; <span class="hljs-comment">// Similar to `new Error().stack`</span></code></pre> 678<p>The first line of the trace will be prefixed with 679<code>${myObject.name}: ${myObject.message}</code>.</p> 680<p>The optional <code>constructorOpt</code> argument accepts a function. If given, all frames 681above <code>constructorOpt</code>, including <code>constructorOpt</code>, will be omitted from the 682generated stack trace.</p> 683<p>The <code>constructorOpt</code> argument is useful for hiding implementation 684details of error generation from the user. For instance:</p> 685<pre><code class="language-js"><span class="hljs-keyword">function</span> <span class="hljs-title function_">MyError</span>(<span class="hljs-params"></span>) { 686 <span class="hljs-title class_">Error</span>.<span class="hljs-title function_">captureStackTrace</span>(<span class="hljs-variable language_">this</span>, <span class="hljs-title class_">MyError</span>); 687} 688 689<span class="hljs-comment">// Without passing MyError to captureStackTrace, the MyError</span> 690<span class="hljs-comment">// frame would show up in the .stack property. By passing</span> 691<span class="hljs-comment">// the constructor, we omit that frame, and retain all frames below it.</span> 692<span class="hljs-keyword">new</span> <span class="hljs-title class_">MyError</span>().<span class="hljs-property">stack</span>;</code></pre> 693<h4><code>Error.stackTraceLimit</code><span><a class="mark" href="#errors_error_stacktracelimit" id="errors_error_stacktracelimit">#</a></span></h4> 694<ul> 695<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a></li> 696</ul> 697<p>The <code>Error.stackTraceLimit</code> property specifies the number of stack frames 698collected by a stack trace (whether generated by <code>new Error().stack</code> or 699<code>Error.captureStackTrace(obj)</code>).</p> 700<p>The default value is <code>10</code> but may be set to any valid JavaScript number. Changes 701will affect any stack trace captured <em>after</em> the value has been changed.</p> 702<p>If set to a non-number value, or set to a negative number, stack traces will 703not capture any frames.</p> 704<h4><code>error.code</code><span><a class="mark" href="#errors_error_code" id="errors_error_code">#</a></span></h4> 705<ul> 706<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> 707</ul> 708<p>The <code>error.code</code> property is a string label that identifies the kind of error. 709<code>error.code</code> is the most stable way to identify an error. It will only change 710between major versions of Node.js. In contrast, <code>error.message</code> strings may 711change between any versions of Node.js. See <a href="#nodejs-error-codes">Node.js error codes</a> for details 712about specific codes.</p> 713<h4><code>error.message</code><span><a class="mark" href="#errors_error_message" id="errors_error_message">#</a></span></h4> 714<ul> 715<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> 716</ul> 717<p>The <code>error.message</code> property is the string description of the error as set by 718calling <code>new Error(message)</code>. The <code>message</code> passed to the constructor will also 719appear in the first line of the stack trace of the <code>Error</code>, however changing 720this property after the <code>Error</code> object is created <em>may not</em> change the first 721line of the stack trace (for example, when <code>error.stack</code> is read before this 722property is changed).</p> 723<pre><code class="language-js"><span class="hljs-keyword">const</span> err = <span class="hljs-keyword">new</span> <span class="hljs-title class_">Error</span>(<span class="hljs-string">'The message'</span>); 724<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">error</span>(err.<span class="hljs-property">message</span>); 725<span class="hljs-comment">// Prints: The message</span></code></pre> 726<h4><code>error.stack</code><span><a class="mark" href="#errors_error_stack" id="errors_error_stack">#</a></span></h4> 727<ul> 728<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> 729</ul> 730<p>The <code>error.stack</code> property is a string describing the point in the code at which 731the <code>Error</code> was instantiated.</p> 732<pre><code class="language-console">Error: Things keep happening! 733 at /home/gbusey/file.js:525:2 734 at Frobnicator.refrobulate (/home/gbusey/business-logic.js:424:21) 735 at Actor.<anonymous> (/home/gbusey/actors.js:400:8) 736 at increaseSynergy (/home/gbusey/actors.js:701:6)</code></pre> 737<p>The first line is formatted as <code><error class name>: <error message></code>, and 738is followed by a series of stack frames (each line beginning with "at "). 739Each frame describes a call site within the code that lead to the error being 740generated. V8 attempts to display a name for each function (by variable name, 741function name, or object method name), but occasionally it will not be able to 742find a suitable name. If V8 cannot determine a name for the function, only 743location information will be displayed for that frame. Otherwise, the 744determined function name will be displayed with location information appended 745in parentheses.</p> 746<p>Frames are only generated for JavaScript functions. If, for example, execution 747synchronously passes through a C++ addon function called <code>cheetahify</code> which 748itself calls a JavaScript function, the frame representing the <code>cheetahify</code> call 749will not be present in the stack traces:</p> 750<pre><code class="language-js"><span class="hljs-keyword">const</span> cheetahify = <span class="hljs-built_in">require</span>(<span class="hljs-string">'./native-binding.node'</span>); 751 752<span class="hljs-keyword">function</span> <span class="hljs-title function_">makeFaster</span>(<span class="hljs-params"></span>) { 753 <span class="hljs-comment">// `cheetahify()` *synchronously* calls speedy.</span> 754 <span class="hljs-title function_">cheetahify</span>(<span class="hljs-keyword">function</span> <span class="hljs-title function_">speedy</span>(<span class="hljs-params"></span>) { 755 <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> <span class="hljs-title class_">Error</span>(<span class="hljs-string">'oh no!'</span>); 756 }); 757} 758 759<span class="hljs-title function_">makeFaster</span>(); 760<span class="hljs-comment">// will throw:</span> 761<span class="hljs-comment">// /home/gbusey/file.js:6</span> 762<span class="hljs-comment">// throw new Error('oh no!');</span> 763<span class="hljs-comment">// ^</span> 764<span class="hljs-comment">// Error: oh no!</span> 765<span class="hljs-comment">// at speedy (/home/gbusey/file.js:6:11)</span> 766<span class="hljs-comment">// at makeFaster (/home/gbusey/file.js:5:3)</span> 767<span class="hljs-comment">// at Object.<anonymous> (/home/gbusey/file.js:10:1)</span> 768<span class="hljs-comment">// at Module._compile (module.js:456:26)</span> 769<span class="hljs-comment">// at Object.Module._extensions..js (module.js:474:10)</span> 770<span class="hljs-comment">// at Module.load (module.js:356:32)</span> 771<span class="hljs-comment">// at Function.Module._load (module.js:312:12)</span> 772<span class="hljs-comment">// at Function.Module.runMain (module.js:497:10)</span> 773<span class="hljs-comment">// at startup (node.js:119:16)</span> 774<span class="hljs-comment">// at node.js:906:3</span></code></pre> 775<p>The location information will be one of:</p> 776<ul> 777<li><code>native</code>, if the frame represents a call internal to V8 (as in <code>[].forEach</code>).</li> 778<li><code>plain-filename.js:line:column</code>, if the frame represents a call internal 779to Node.js.</li> 780<li><code>/absolute/path/to/file.js:line:column</code>, if the frame represents a call in 781a user program, or its dependencies.</li> 782</ul> 783<p>The string representing the stack trace is lazily generated when the 784<code>error.stack</code> property is <strong>accessed</strong>.</p> 785<p>The number of frames captured by the stack trace is bounded by the smaller of 786<code>Error.stackTraceLimit</code> or the number of available frames on the current event 787loop tick.</p> 788</section><section><h3>Class: <code>AssertionError</code><span><a class="mark" href="#errors_class_assertionerror" id="errors_class_assertionerror">#</a></span></h3> 789<ul> 790<li>Extends: <a href="errors.html#errors_class_error" class="type"><errors.Error></a></li> 791</ul> 792<p>Indicates the failure of an assertion. For details, see 793<a href="assert.html#assert_class_assert_assertionerror"><code>Class: assert.AssertionError</code></a>.</p> 794</section><section><h3>Class: <code>RangeError</code><span><a class="mark" href="#errors_class_rangeerror" id="errors_class_rangeerror">#</a></span></h3> 795<ul> 796<li>Extends: <a href="errors.html#errors_class_error" class="type"><errors.Error></a></li> 797</ul> 798<p>Indicates that a provided argument was not within the set or range of 799acceptable values for a function; whether that is a numeric range, or 800outside the set of options for a given function parameter.</p> 801<pre><code class="language-js"><span class="hljs-built_in">require</span>(<span class="hljs-string">'net'</span>).<span class="hljs-title function_">connect</span>(-<span class="hljs-number">1</span>); 802<span class="hljs-comment">// Throws "RangeError: "port" option should be >= 0 and < 65536: -1"</span></code></pre> 803<p>Node.js will generate and throw <code>RangeError</code> instances <em>immediately</em> as a form 804of argument validation.</p> 805</section><section><h3>Class: <code>ReferenceError</code><span><a class="mark" href="#errors_class_referenceerror" id="errors_class_referenceerror">#</a></span></h3> 806<ul> 807<li>Extends: <a href="errors.html#errors_class_error" class="type"><errors.Error></a></li> 808</ul> 809<p>Indicates that an attempt is being made to access a variable that is not 810defined. Such errors commonly indicate typos in code, or an otherwise broken 811program.</p> 812<p>While client code may generate and propagate these errors, in practice, only V8 813will do so.</p> 814<pre><code class="language-js">doesNotExist; 815<span class="hljs-comment">// Throws ReferenceError, doesNotExist is not a variable in this program.</span></code></pre> 816<p>Unless an application is dynamically generating and running code, 817<code>ReferenceError</code> instances indicate a bug in the code or its dependencies.</p> 818</section><section><h3>Class: <code>SyntaxError</code><span><a class="mark" href="#errors_class_syntaxerror" id="errors_class_syntaxerror">#</a></span></h3> 819<ul> 820<li>Extends: <a href="errors.html#errors_class_error" class="type"><errors.Error></a></li> 821</ul> 822<p>Indicates that a program is not valid JavaScript. These errors may only be 823generated and propagated as a result of code evaluation. Code evaluation may 824happen as a result of <code>eval</code>, <code>Function</code>, <code>require</code>, or <a href="vm.html">vm</a>. These errors 825are almost always indicative of a broken program.</p> 826<pre><code class="language-js"><span class="hljs-keyword">try</span> { 827 <span class="hljs-built_in">require</span>(<span class="hljs-string">'vm'</span>).<span class="hljs-title function_">runInThisContext</span>(<span class="hljs-string">'binary ! isNotOk'</span>); 828} <span class="hljs-keyword">catch</span> (err) { 829 <span class="hljs-comment">// 'err' will be a SyntaxError.</span> 830}</code></pre> 831<p><code>SyntaxError</code> instances are unrecoverable in the context that created them – 832they may only be caught by other contexts.</p> 833</section><section><h3>Class: <code>SystemError</code><span><a class="mark" href="#errors_class_systemerror" id="errors_class_systemerror">#</a></span></h3> 834<ul> 835<li>Extends: <a href="errors.html#errors_class_error" class="type"><errors.Error></a></li> 836</ul> 837<p>Node.js generates system errors when exceptions occur within its runtime 838environment. These usually occur when an application violates an operating 839system constraint. For example, a system error will occur if an application 840attempts to read a file that does not exist.</p> 841<ul> 842<li><code>address</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> If present, the address to which a network connection 843failed</li> 844<li><code>code</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The string error code</li> 845<li><code>dest</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> If present, the file path destination when reporting a file 846system error</li> 847<li><code>errno</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> The system-provided error number</li> 848<li><code>info</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> If present, extra details about the error condition</li> 849<li><code>message</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> A system-provided human-readable description of the error</li> 850<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> If present, the file path when reporting a file system error</li> 851<li><code>port</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> If present, the network connection port that is not available</li> 852<li><code>syscall</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The name of the system call that triggered the error</li> 853</ul> 854<h4><code>error.address</code><span><a class="mark" href="#errors_error_address" id="errors_error_address">#</a></span></h4> 855<ul> 856<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> 857</ul> 858<p>If present, <code>error.address</code> is a string describing the address to which a 859network connection failed.</p> 860<h4><code>error.code</code><span><a class="mark" href="#errors_error_code_1" id="errors_error_code_1">#</a></span></h4> 861<ul> 862<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> 863</ul> 864<p>The <code>error.code</code> property is a string representing the error code.</p> 865<h4><code>error.dest</code><span><a class="mark" href="#errors_error_dest" id="errors_error_dest">#</a></span></h4> 866<ul> 867<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> 868</ul> 869<p>If present, <code>error.dest</code> is the file path destination when reporting a file 870system error.</p> 871<h4><code>error.errno</code><span><a class="mark" href="#errors_error_errno" id="errors_error_errno">#</a></span></h4> 872<ul> 873<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a></li> 874</ul> 875<p>The <code>error.errno</code> property is a negative number which corresponds 876to the error code defined in <a href="https://docs.libuv.org/en/v1.x/errors.html"><code>libuv Error handling</code></a>.</p> 877<p>On Windows the error number provided by the system will be normalized by libuv.</p> 878<p>To get the string representation of the error code, use 879<a href="util.html#util_util_getsystemerrorname_err"><code>util.getSystemErrorName(error.errno)</code></a>.</p> 880<h4><code>error.info</code><span><a class="mark" href="#errors_error_info" id="errors_error_info">#</a></span></h4> 881<ul> 882<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a></li> 883</ul> 884<p>If present, <code>error.info</code> is an object with details about the error condition.</p> 885<h4><code>error.message</code><span><a class="mark" href="#errors_error_message_1" id="errors_error_message_1">#</a></span></h4> 886<ul> 887<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> 888</ul> 889<p><code>error.message</code> is a system-provided human-readable description of the error.</p> 890<h4><code>error.path</code><span><a class="mark" href="#errors_error_path" id="errors_error_path">#</a></span></h4> 891<ul> 892<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> 893</ul> 894<p>If present, <code>error.path</code> is a string containing a relevant invalid pathname.</p> 895<h4><code>error.port</code><span><a class="mark" href="#errors_error_port" id="errors_error_port">#</a></span></h4> 896<ul> 897<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a></li> 898</ul> 899<p>If present, <code>error.port</code> is the network connection port that is not available.</p> 900<h4><code>error.syscall</code><span><a class="mark" href="#errors_error_syscall" id="errors_error_syscall">#</a></span></h4> 901<ul> 902<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> 903</ul> 904<p>The <code>error.syscall</code> property is a string describing the <a href="https://man7.org/linux/man-pages/man2/syscalls.2.html">syscall</a> that failed.</p> 905<h4>Common system errors<span><a class="mark" href="#errors_common_system_errors" id="errors_common_system_errors">#</a></span></h4> 906<p>This is a list of system errors commonly-encountered when writing a Node.js 907program. For a comprehensive list, see the <a href="https://man7.org/linux/man-pages/man3/errno.3.html"><code>errno</code>(3) man page</a>.</p> 908<ul> 909<li> 910<p><code>EACCES</code> (Permission denied): An attempt was made to access a file in a way 911forbidden by its file access permissions.</p> 912</li> 913<li> 914<p><code>EADDRINUSE</code> (Address already in use): An attempt to bind a server 915(<a href="net.html"><code>net</code></a>, <a href="http.html"><code>http</code></a>, or <a href="https.html"><code>https</code></a>) to a local address failed due to 916another server on the local system already occupying that address.</p> 917</li> 918<li> 919<p><code>ECONNREFUSED</code> (Connection refused): No connection could be made because the 920target machine actively refused it. This usually results from trying to 921connect to a service that is inactive on the foreign host.</p> 922</li> 923<li> 924<p><code>ECONNRESET</code> (Connection reset by peer): A connection was forcibly closed by 925a peer. This normally results from a loss of the connection on the remote 926socket due to a timeout or reboot. Commonly encountered via the <a href="http.html"><code>http</code></a> 927and <a href="net.html"><code>net</code></a> modules.</p> 928</li> 929<li> 930<p><code>EEXIST</code> (File exists): An existing file was the target of an operation that 931required that the target not exist.</p> 932</li> 933<li> 934<p><code>EISDIR</code> (Is a directory): An operation expected a file, but the given 935pathname was a directory.</p> 936</li> 937<li> 938<p><code>EMFILE</code> (Too many open files in system): Maximum number of 939<a href="https://en.wikipedia.org/wiki/File_descriptor">file descriptors</a> allowable on the system has been reached, and 940requests for another descriptor cannot be fulfilled until at least one 941has been closed. This is encountered when opening many files at once in 942parallel, especially on systems (in particular, macOS) where there is a low 943file descriptor limit for processes. To remedy a low limit, run 944<code>ulimit -n 2048</code> in the same shell that will run the Node.js process.</p> 945</li> 946<li> 947<p><code>ENOENT</code> (No such file or directory): Commonly raised by <a href="fs.html"><code>fs</code></a> operations 948to indicate that a component of the specified pathname does not exist. No 949entity (file or directory) could be found by the given path.</p> 950</li> 951<li> 952<p><code>ENOTDIR</code> (Not a directory): A component of the given pathname existed, but 953was not a directory as expected. Commonly raised by <a href="fs.html#fs_fs_readdir_path_options_callback"><code>fs.readdir</code></a>.</p> 954</li> 955<li> 956<p><code>ENOTEMPTY</code> (Directory not empty): A directory with entries was the target 957of an operation that requires an empty directory, usually <a href="fs.html#fs_fs_unlink_path_callback"><code>fs.unlink</code></a>.</p> 958</li> 959<li> 960<p><code>ENOTFOUND</code> (DNS lookup failed): Indicates a DNS failure of either 961<code>EAI_NODATA</code> or <code>EAI_NONAME</code>. This is not a standard POSIX error.</p> 962</li> 963<li> 964<p><code>EPERM</code> (Operation not permitted): An attempt was made to perform an 965operation that requires elevated privileges.</p> 966</li> 967<li> 968<p><code>EPIPE</code> (Broken pipe): A write on a pipe, socket, or FIFO for which there is 969no process to read the data. Commonly encountered at the <a href="net.html"><code>net</code></a> and 970<a href="http.html"><code>http</code></a> layers, indicative that the remote side of the stream being 971written to has been closed.</p> 972</li> 973<li> 974<p><code>ETIMEDOUT</code> (Operation timed out): A connect or send request failed because 975the connected party did not properly respond after a period of time. Usually 976encountered by <a href="http.html"><code>http</code></a> or <a href="net.html"><code>net</code></a>. Often a sign that a <code>socket.end()</code> 977was not properly called.</p> 978</li> 979</ul> 980</section><section><h3>Class: <code>TypeError</code><span><a class="mark" href="#errors_class_typeerror" id="errors_class_typeerror">#</a></span></h3> 981<ul> 982<li>Extends <a href="errors.html#errors_class_error" class="type"><errors.Error></a></li> 983</ul> 984<p>Indicates that a provided argument is not an allowable type. For example, 985passing a function to a parameter which expects a string would be a <code>TypeError</code>.</p> 986<pre><code class="language-js"><span class="hljs-built_in">require</span>(<span class="hljs-string">'url'</span>).<span class="hljs-title function_">parse</span>(<span class="hljs-function">() =></span> { }); 987<span class="hljs-comment">// Throws TypeError, since it expected a string.</span></code></pre> 988<p>Node.js will generate and throw <code>TypeError</code> instances <em>immediately</em> as a form 989of argument validation.</p> 990</section><section><h3>Exceptions vs. errors<span><a class="mark" href="#errors_exceptions_vs_errors" id="errors_exceptions_vs_errors">#</a></span></h3> 991 992<p>A JavaScript exception is a value that is thrown as a result of an invalid 993operation or as the target of a <code>throw</code> statement. While it is not required 994that these values are instances of <code>Error</code> or classes which inherit from 995<code>Error</code>, all exceptions thrown by Node.js or the JavaScript runtime <em>will</em> be 996instances of <code>Error</code>.</p> 997<p>Some exceptions are <em>unrecoverable</em> at the JavaScript layer. Such exceptions 998will <em>always</em> cause the Node.js process to crash. Examples include <code>assert()</code> 999checks or <code>abort()</code> calls in the C++ layer.</p> 1000</section><section><h3>OpenSSL errors<span><a class="mark" href="#errors_openssl_errors" id="errors_openssl_errors">#</a></span></h3> 1001<p>Errors originating in <code>crypto</code> or <code>tls</code> are of class <code>Error</code>, and in addition to 1002the standard <code>.code</code> and <code>.message</code> properties, may have some additional 1003OpenSSL-specific properties.</p> 1004<h4><code>error.opensslErrorStack</code><span><a class="mark" href="#errors_error_opensslerrorstack" id="errors_error_opensslerrorstack">#</a></span></h4> 1005<p>An array of errors that can give context to where in the OpenSSL library an 1006error originates from.</p> 1007<h4><code>error.function</code><span><a class="mark" href="#errors_error_function" id="errors_error_function">#</a></span></h4> 1008<p>The OpenSSL function the error originates in.</p> 1009<h4><code>error.library</code><span><a class="mark" href="#errors_error_library" id="errors_error_library">#</a></span></h4> 1010<p>The OpenSSL library the error originates in.</p> 1011<h4><code>error.reason</code><span><a class="mark" href="#errors_error_reason" id="errors_error_reason">#</a></span></h4> 1012<p>A human-readable string describing the reason for the error.</p> 1013<p><a id="nodejs-error-codes"></a></p> 1014</section><section><h3>Node.js error codes<span><a class="mark" href="#errors_node_js_error_codes" id="errors_node_js_error_codes">#</a></span></h3> 1015<p><a id="ABORT_ERR"></a></p> 1016<h4><code>ABORT_ERR</code><span><a class="mark" href="#errors_abort_err" id="errors_abort_err">#</a></span></h4> 1017<div class="api_metadata"> 1018<span>Added in: v14.17.0</span> 1019</div> 1020<p>Used when an operation has been aborted (typically using an <code>AbortController</code>).</p> 1021<p>APIs <em>not</em> using <code>AbortSignal</code>s typically do not raise an error with this code.</p> 1022<p>This code does not use the regular <code>ERR_*</code> convention Node.js errors use in 1023order to be compatible with the web platform's <code>AbortError</code>.</p> 1024<p><a id="ERR_AMBIGUOUS_ARGUMENT"></a></p> 1025<h4><code>ERR_AMBIGUOUS_ARGUMENT</code><span><a class="mark" href="#errors_err_ambiguous_argument" id="errors_err_ambiguous_argument">#</a></span></h4> 1026<p>A function argument is being used in a way that suggests that the function 1027signature may be misunderstood. This is thrown by the <code>assert</code> module when the 1028<code>message</code> parameter in <code>assert.throws(block, message)</code> matches the error message 1029thrown by <code>block</code> because that usage suggests that the user believes <code>message</code> 1030is the expected message rather than the message the <code>AssertionError</code> will 1031display if <code>block</code> does not throw.</p> 1032<p><a id="ERR_ARG_NOT_ITERABLE"></a></p> 1033<h4><code>ERR_ARG_NOT_ITERABLE</code><span><a class="mark" href="#errors_err_arg_not_iterable" id="errors_err_arg_not_iterable">#</a></span></h4> 1034<p>An iterable argument (i.e. a value that works with <code>for...of</code> loops) was 1035required, but not provided to a Node.js API.</p> 1036<p><a id="ERR_ASSERTION"></a></p> 1037<h4><code>ERR_ASSERTION</code><span><a class="mark" href="#errors_err_assertion" id="errors_err_assertion">#</a></span></h4> 1038<p>A special type of error that can be triggered whenever Node.js detects an 1039exceptional logic violation that should never occur. These are raised typically 1040by the <code>assert</code> module.</p> 1041<p><a id="ERR_ASYNC_CALLBACK"></a></p> 1042<h4><code>ERR_ASYNC_CALLBACK</code><span><a class="mark" href="#errors_err_async_callback" id="errors_err_async_callback">#</a></span></h4> 1043<p>An attempt was made to register something that is not a function as an 1044<code>AsyncHooks</code> callback.</p> 1045<p><a id="ERR_ASYNC_TYPE"></a></p> 1046<h4><code>ERR_ASYNC_TYPE</code><span><a class="mark" href="#errors_err_async_type" id="errors_err_async_type">#</a></span></h4> 1047<p>The type of an asynchronous resource was invalid. Users are also able 1048to define their own types if using the public embedder API.</p> 1049<p><a id="ERR_BROTLI_COMPRESSION_FAILED"></a></p> 1050<h4><code>ERR_BROTLI_COMPRESSION_FAILED</code><span><a class="mark" href="#errors_err_brotli_compression_failed" id="errors_err_brotli_compression_failed">#</a></span></h4> 1051<p>Data passed to a Brotli stream was not successfully compressed.</p> 1052<p><a id="ERR_BROTLI_INVALID_PARAM"></a></p> 1053<h4><code>ERR_BROTLI_INVALID_PARAM</code><span><a class="mark" href="#errors_err_brotli_invalid_param" id="errors_err_brotli_invalid_param">#</a></span></h4> 1054<p>An invalid parameter key was passed during construction of a Brotli stream.</p> 1055<p><a id="ERR_BUFFER_CONTEXT_NOT_AVAILABLE"></a></p> 1056<h4><code>ERR_BUFFER_CONTEXT_NOT_AVAILABLE</code><span><a class="mark" href="#errors_err_buffer_context_not_available" id="errors_err_buffer_context_not_available">#</a></span></h4> 1057<p>An attempt was made to create a Node.js <code>Buffer</code> instance from addon or embedder 1058code, while in a JS engine Context that is not associated with a Node.js 1059instance. The data passed to the <code>Buffer</code> method will have been released 1060by the time the method returns.</p> 1061<p>When encountering this error, a possible alternative to creating a <code>Buffer</code> 1062instance is to create a normal <code>Uint8Array</code>, which only differs in the 1063prototype of the resulting object. <code>Uint8Array</code>s are generally accepted in all 1064Node.js core APIs where <code>Buffer</code>s are; they are available in all Contexts.</p> 1065<p><a id="ERR_BUFFER_OUT_OF_BOUNDS"></a></p> 1066<h4><code>ERR_BUFFER_OUT_OF_BOUNDS</code><span><a class="mark" href="#errors_err_buffer_out_of_bounds" id="errors_err_buffer_out_of_bounds">#</a></span></h4> 1067<p>An operation outside the bounds of a <code>Buffer</code> was attempted.</p> 1068<p><a id="ERR_BUFFER_TOO_LARGE"></a></p> 1069<h4><code>ERR_BUFFER_TOO_LARGE</code><span><a class="mark" href="#errors_err_buffer_too_large" id="errors_err_buffer_too_large">#</a></span></h4> 1070<p>An attempt has been made to create a <code>Buffer</code> larger than the maximum allowed 1071size.</p> 1072<p><a id="ERR_CANNOT_WATCH_SIGINT"></a></p> 1073<h4><code>ERR_CANNOT_WATCH_SIGINT</code><span><a class="mark" href="#errors_err_cannot_watch_sigint" id="errors_err_cannot_watch_sigint">#</a></span></h4> 1074<p>Node.js was unable to watch for the <code>SIGINT</code> signal.</p> 1075<p><a id="ERR_CHILD_CLOSED_BEFORE_REPLY"></a></p> 1076<h4><code>ERR_CHILD_CLOSED_BEFORE_REPLY</code><span><a class="mark" href="#errors_err_child_closed_before_reply" id="errors_err_child_closed_before_reply">#</a></span></h4> 1077<p>A child process was closed before the parent received a reply.</p> 1078<p><a id="ERR_CHILD_PROCESS_IPC_REQUIRED"></a></p> 1079<h4><code>ERR_CHILD_PROCESS_IPC_REQUIRED</code><span><a class="mark" href="#errors_err_child_process_ipc_required" id="errors_err_child_process_ipc_required">#</a></span></h4> 1080<p>Used when a child process is being forked without specifying an IPC channel.</p> 1081<p><a id="ERR_CHILD_PROCESS_STDIO_MAXBUFFER"></a></p> 1082<h4><code>ERR_CHILD_PROCESS_STDIO_MAXBUFFER</code><span><a class="mark" href="#errors_err_child_process_stdio_maxbuffer" id="errors_err_child_process_stdio_maxbuffer">#</a></span></h4> 1083<p>Used when the main process is trying to read data from the child process's 1084STDERR/STDOUT, and the data's length is longer than the <code>maxBuffer</code> option.</p> 1085<p><a id="ERR_CLOSED_MESSAGE_PORT"></a></p> 1086<h4><code>ERR_CLOSED_MESSAGE_PORT</code><span><a class="mark" href="#errors_err_closed_message_port" id="errors_err_closed_message_port">#</a></span></h4> 1087<!-- 1088added: v14.17.1 1089changes: 1090 - version: 11.12.0 1091 pr-url: https://github.com/nodejs/node/pull/26487 1092 description: The error message was removed. 1093 - version: v14.17.1 1094 pr-url: https://github.com/nodejs/node/pull/38510 1095 description: The error message was reintroduced. 1096--> 1097<p>There was an attempt to use a <code>MessagePort</code> instance in a closed 1098state, usually after <code>.close()</code> has been called.</p> 1099<p><a id="ERR_CONSOLE_WRITABLE_STREAM"></a></p> 1100<h4><code>ERR_CONSOLE_WRITABLE_STREAM</code><span><a class="mark" href="#errors_err_console_writable_stream" id="errors_err_console_writable_stream">#</a></span></h4> 1101<p><code>Console</code> was instantiated without <code>stdout</code> stream, or <code>Console</code> has a 1102non-writable <code>stdout</code> or <code>stderr</code> stream.</p> 1103<p><a id="ERR_CONSTRUCT_CALL_INVALID"></a></p> 1104<h4><code>ERR_CONSTRUCT_CALL_INVALID</code><span><a class="mark" href="#errors_err_construct_call_invalid" id="errors_err_construct_call_invalid">#</a></span></h4> 1105<!-- 1106added: v12.5.0 1107--> 1108<p>A class constructor was called that is not callable.</p> 1109<p><a id="ERR_CONSTRUCT_CALL_REQUIRED"></a></p> 1110<h4><code>ERR_CONSTRUCT_CALL_REQUIRED</code><span><a class="mark" href="#errors_err_construct_call_required" id="errors_err_construct_call_required">#</a></span></h4> 1111<p>A constructor for a class was called without <code>new</code>.</p> 1112<p><a id="ERR_CONTEXT_NOT_INITIALIZED"></a></p> 1113<h4><code>ERR_CONTEXT_NOT_INITIALIZED</code><span><a class="mark" href="#errors_err_context_not_initialized" id="errors_err_context_not_initialized">#</a></span></h4> 1114<p>The vm context passed into the API is not yet initialized. This could happen 1115when an error occurs (and is caught) during the creation of the 1116context, for example, when the allocation fails or the maximum call stack 1117size is reached when the context is created.</p> 1118<p><a id="ERR_CPU_USAGE"></a></p> 1119<h4><code>ERR_CPU_USAGE</code><span><a class="mark" href="#errors_err_cpu_usage" id="errors_err_cpu_usage">#</a></span></h4> 1120<p>The native call from <code>process.cpuUsage</code> could not be processed.</p> 1121<p><a id="ERR_CRYPTO_CUSTOM_ENGINE_NOT_SUPPORTED"></a></p> 1122<h4><code>ERR_CRYPTO_CUSTOM_ENGINE_NOT_SUPPORTED</code><span><a class="mark" href="#errors_err_crypto_custom_engine_not_supported" id="errors_err_crypto_custom_engine_not_supported">#</a></span></h4> 1123<p>A client certificate engine was requested that is not supported by the version 1124of OpenSSL being used.</p> 1125<p><a id="ERR_CRYPTO_ECDH_INVALID_FORMAT"></a></p> 1126<h4><code>ERR_CRYPTO_ECDH_INVALID_FORMAT</code><span><a class="mark" href="#errors_err_crypto_ecdh_invalid_format" id="errors_err_crypto_ecdh_invalid_format">#</a></span></h4> 1127<p>An invalid value for the <code>format</code> argument was passed to the <code>crypto.ECDH()</code> 1128class <code>getPublicKey()</code> method.</p> 1129<p><a id="ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY"></a></p> 1130<h4><code>ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY</code><span><a class="mark" href="#errors_err_crypto_ecdh_invalid_public_key" id="errors_err_crypto_ecdh_invalid_public_key">#</a></span></h4> 1131<p>An invalid value for the <code>key</code> argument has been passed to the 1132<code>crypto.ECDH()</code> class <code>computeSecret()</code> method. It means that the public 1133key lies outside of the elliptic curve.</p> 1134<p><a id="ERR_CRYPTO_ENGINE_UNKNOWN"></a></p> 1135<h4><code>ERR_CRYPTO_ENGINE_UNKNOWN</code><span><a class="mark" href="#errors_err_crypto_engine_unknown" id="errors_err_crypto_engine_unknown">#</a></span></h4> 1136<p>An invalid crypto engine identifier was passed to 1137<a href="crypto.html#crypto_crypto_setengine_engine_flags"><code>require('crypto').setEngine()</code></a>.</p> 1138<p><a id="ERR_CRYPTO_FIPS_FORCED"></a></p> 1139<h4><code>ERR_CRYPTO_FIPS_FORCED</code><span><a class="mark" href="#errors_err_crypto_fips_forced" id="errors_err_crypto_fips_forced">#</a></span></h4> 1140<p>The <a href="cli.html#cli_force_fips"><code>--force-fips</code></a> command-line argument was used but there was an attempt 1141to enable or disable FIPS mode in the <code>crypto</code> module.</p> 1142<p><a id="ERR_CRYPTO_FIPS_UNAVAILABLE"></a></p> 1143<h4><code>ERR_CRYPTO_FIPS_UNAVAILABLE</code><span><a class="mark" href="#errors_err_crypto_fips_unavailable" id="errors_err_crypto_fips_unavailable">#</a></span></h4> 1144<p>An attempt was made to enable or disable FIPS mode, but FIPS mode was not 1145available.</p> 1146<p><a id="ERR_CRYPTO_HASH_FINALIZED"></a></p> 1147<h4><code>ERR_CRYPTO_HASH_FINALIZED</code><span><a class="mark" href="#errors_err_crypto_hash_finalized" id="errors_err_crypto_hash_finalized">#</a></span></h4> 1148<p><a href="crypto.html#crypto_hash_digest_encoding"><code>hash.digest()</code></a> was called multiple times. The <code>hash.digest()</code> method must 1149be called no more than one time per instance of a <code>Hash</code> object.</p> 1150<p><a id="ERR_CRYPTO_HASH_UPDATE_FAILED"></a></p> 1151<h4><code>ERR_CRYPTO_HASH_UPDATE_FAILED</code><span><a class="mark" href="#errors_err_crypto_hash_update_failed" id="errors_err_crypto_hash_update_failed">#</a></span></h4> 1152<p><a href="crypto.html#crypto_hash_update_data_inputencoding"><code>hash.update()</code></a> failed for any reason. This should rarely, if ever, happen.</p> 1153<p><a id="ERR_CRYPTO_INCOMPATIBLE_KEY"></a></p> 1154<h4><code>ERR_CRYPTO_INCOMPATIBLE_KEY</code><span><a class="mark" href="#errors_err_crypto_incompatible_key" id="errors_err_crypto_incompatible_key">#</a></span></h4> 1155<p>The given crypto keys are incompatible with the attempted operation.</p> 1156<p><a id="ERR_CRYPTO_INCOMPATIBLE_KEY_OPTIONS"></a></p> 1157<h4><code>ERR_CRYPTO_INCOMPATIBLE_KEY_OPTIONS</code><span><a class="mark" href="#errors_err_crypto_incompatible_key_options" id="errors_err_crypto_incompatible_key_options">#</a></span></h4> 1158<p>The selected public or private key encoding is incompatible with other options.</p> 1159<p><a id="ERR_CRYPTO_INVALID_DIGEST"></a></p> 1160<h4><code>ERR_CRYPTO_INVALID_DIGEST</code><span><a class="mark" href="#errors_err_crypto_invalid_digest" id="errors_err_crypto_invalid_digest">#</a></span></h4> 1161<p>An invalid <a href="crypto.html#crypto_crypto_gethashes">crypto digest algorithm</a> was specified.</p> 1162<p><a id="ERR_CRYPTO_INVALID_KEY_OBJECT_TYPE"></a></p> 1163<h4><code>ERR_CRYPTO_INVALID_KEY_OBJECT_TYPE</code><span><a class="mark" href="#errors_err_crypto_invalid_key_object_type" id="errors_err_crypto_invalid_key_object_type">#</a></span></h4> 1164<p>The given crypto key object's type is invalid for the attempted operation.</p> 1165<p><a id="ERR_CRYPTO_INVALID_STATE"></a></p> 1166<h4><code>ERR_CRYPTO_INVALID_STATE</code><span><a class="mark" href="#errors_err_crypto_invalid_state" id="errors_err_crypto_invalid_state">#</a></span></h4> 1167<p>A crypto method was used on an object that was in an invalid state. For 1168instance, calling <a href="crypto.html#crypto_cipher_getauthtag"><code>cipher.getAuthTag()</code></a> before calling <code>cipher.final()</code>.</p> 1169<p><a id="ERR_CRYPTO_PBKDF2_ERROR"></a></p> 1170<h4><code>ERR_CRYPTO_PBKDF2_ERROR</code><span><a class="mark" href="#errors_err_crypto_pbkdf2_error" id="errors_err_crypto_pbkdf2_error">#</a></span></h4> 1171<p>The PBKDF2 algorithm failed for unspecified reasons. OpenSSL does not provide 1172more details and therefore neither does Node.js.</p> 1173<p><a id="ERR_CRYPTO_SCRYPT_INVALID_PARAMETER"></a></p> 1174<h4><code>ERR_CRYPTO_SCRYPT_INVALID_PARAMETER</code><span><a class="mark" href="#errors_err_crypto_scrypt_invalid_parameter" id="errors_err_crypto_scrypt_invalid_parameter">#</a></span></h4> 1175<p>One or more <a href="crypto.html#crypto_crypto_scrypt_password_salt_keylen_options_callback"><code>crypto.scrypt()</code></a> or <a href="crypto.html#crypto_crypto_scryptsync_password_salt_keylen_options"><code>crypto.scryptSync()</code></a> parameters are 1176outside their legal range.</p> 1177<p><a id="ERR_CRYPTO_SCRYPT_NOT_SUPPORTED"></a></p> 1178<h4><code>ERR_CRYPTO_SCRYPT_NOT_SUPPORTED</code><span><a class="mark" href="#errors_err_crypto_scrypt_not_supported" id="errors_err_crypto_scrypt_not_supported">#</a></span></h4> 1179<p>Node.js was compiled without <code>scrypt</code> support. Not possible with the official 1180release binaries but can happen with custom builds, including distro builds.</p> 1181<p><a id="ERR_CRYPTO_SIGN_KEY_REQUIRED"></a></p> 1182<h4><code>ERR_CRYPTO_SIGN_KEY_REQUIRED</code><span><a class="mark" href="#errors_err_crypto_sign_key_required" id="errors_err_crypto_sign_key_required">#</a></span></h4> 1183<p>A signing <code>key</code> was not provided to the <a href="crypto.html#crypto_sign_sign_privatekey_outputencoding"><code>sign.sign()</code></a> method.</p> 1184<p><a id="ERR_CRYPTO_TIMING_SAFE_EQUAL_LENGTH"></a></p> 1185<h4><code>ERR_CRYPTO_TIMING_SAFE_EQUAL_LENGTH</code><span><a class="mark" href="#errors_err_crypto_timing_safe_equal_length" id="errors_err_crypto_timing_safe_equal_length">#</a></span></h4> 1186<p><a href="crypto.html#crypto_crypto_timingsafeequal_a_b"><code>crypto.timingSafeEqual()</code></a> was called with <code>Buffer</code>, <code>TypedArray</code>, or 1187<code>DataView</code> arguments of different lengths.</p> 1188<p><a id="ERR_CRYPTO_UNKNOWN_CIPHER"></a></p> 1189<h4><code>ERR_CRYPTO_UNKNOWN_CIPHER</code><span><a class="mark" href="#errors_err_crypto_unknown_cipher" id="errors_err_crypto_unknown_cipher">#</a></span></h4> 1190<p>An unknown cipher was specified.</p> 1191<p><a id="ERR_CRYPTO_UNKNOWN_DH_GROUP"></a></p> 1192<h4><code>ERR_CRYPTO_UNKNOWN_DH_GROUP</code><span><a class="mark" href="#errors_err_crypto_unknown_dh_group" id="errors_err_crypto_unknown_dh_group">#</a></span></h4> 1193<p>An unknown Diffie-Hellman group name was given. See 1194<a href="crypto.html#crypto_crypto_getdiffiehellman_groupname"><code>crypto.getDiffieHellman()</code></a> for a list of valid group names.</p> 1195<p><a id="ERR_DLOPEN_DISABLED"></a></p> 1196<h4><code>ERR_DLOPEN_DISABLED</code><span><a class="mark" href="#errors_err_dlopen_disabled" id="errors_err_dlopen_disabled">#</a></span></h4> 1197<div class="api_metadata"> 1198<span>Added in: v14.19.0</span> 1199</div> 1200<p>Loading native addons has been disabled using <a href="cli.html#cli_no_addons"><code>--no-addons</code></a>.</p> 1201<p><a id="ERR_DLOPEN_FAILED"></a></p> 1202<h4><code>ERR_DLOPEN_FAILED</code><span><a class="mark" href="#errors_err_dlopen_failed" id="errors_err_dlopen_failed">#</a></span></h4> 1203<div class="api_metadata"> 1204<span>Added in: v14.18.0</span> 1205</div> 1206<p>A call to <code>process.dlopen()</code> failed.</p> 1207<p><a id="ERR_DEBUGGER_ERROR"></a></p> 1208<h4><code>ERR_DEBUGGER_ERROR</code><span><a class="mark" href="#errors_err_debugger_error" id="errors_err_debugger_error">#</a></span></h4> 1209<div class="api_metadata"> 1210<span>Added in: v14.17.4</span> 1211</div> 1212<p>An error occurred with the <a href="debugger.html">debugger</a>.</p> 1213<p><a id="ERR_DEBUGGER_STARTUP_ERROR"></a></p> 1214<h4><code>ERR_DEBUGGER_STARTUP_ERROR</code><span><a class="mark" href="#errors_err_debugger_startup_error" id="errors_err_debugger_startup_error">#</a></span></h4> 1215<div class="api_metadata"> 1216<span>Added in: v14.17.4</span> 1217</div> 1218<p>The <a href="debugger.html">debugger</a> timed out waiting for the required host/port to be free.</p> 1219<p><a id="ERR_DIR_CLOSED"></a></p> 1220<h4><code>ERR_DIR_CLOSED</code><span><a class="mark" href="#errors_err_dir_closed" id="errors_err_dir_closed">#</a></span></h4> 1221<p>The <a href="fs.html#fs_class_fs_dir"><code>fs.Dir</code></a> was previously closed.</p> 1222<p><a id="ERR_DIR_CONCURRENT_OPERATION"></a></p> 1223<h4><code>ERR_DIR_CONCURRENT_OPERATION</code><span><a class="mark" href="#errors_err_dir_concurrent_operation" id="errors_err_dir_concurrent_operation">#</a></span></h4> 1224<div class="api_metadata"> 1225<span>Added in: v14.3.0</span> 1226</div> 1227<p>A synchronous read or close call was attempted on an <a href="fs.html#fs_class_fs_dir"><code>fs.Dir</code></a> which has 1228ongoing asynchronous operations.</p> 1229<p><a id="ERR_DNS_SET_SERVERS_FAILED"></a></p> 1230<h4><code>ERR_DNS_SET_SERVERS_FAILED</code><span><a class="mark" href="#errors_err_dns_set_servers_failed" id="errors_err_dns_set_servers_failed">#</a></span></h4> 1231<p><code>c-ares</code> failed to set the DNS server.</p> 1232<p><a id="ERR_DOMAIN_CALLBACK_NOT_AVAILABLE"></a></p> 1233<h4><code>ERR_DOMAIN_CALLBACK_NOT_AVAILABLE</code><span><a class="mark" href="#errors_err_domain_callback_not_available" id="errors_err_domain_callback_not_available">#</a></span></h4> 1234<p>The <code>domain</code> module was not usable since it could not establish the required 1235error handling hooks, because 1236<a href="process.html#process_process_setuncaughtexceptioncapturecallback_fn"><code>process.setUncaughtExceptionCaptureCallback()</code></a> had been called at an 1237earlier point in time.</p> 1238<p><a id="ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE"></a></p> 1239<h4><code>ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE</code><span><a class="mark" href="#errors_err_domain_cannot_set_uncaught_exception_capture" id="errors_err_domain_cannot_set_uncaught_exception_capture">#</a></span></h4> 1240<p><a href="process.html#process_process_setuncaughtexceptioncapturecallback_fn"><code>process.setUncaughtExceptionCaptureCallback()</code></a> could not be called 1241because the <code>domain</code> module has been loaded at an earlier point in time.</p> 1242<p>The stack trace is extended to include the point in time at which the 1243<code>domain</code> module had been loaded.</p> 1244<p><a id="ERR_ENCODING_INVALID_ENCODED_DATA"></a></p> 1245<h4><code>ERR_ENCODING_INVALID_ENCODED_DATA</code><span><a class="mark" href="#errors_err_encoding_invalid_encoded_data" id="errors_err_encoding_invalid_encoded_data">#</a></span></h4> 1246<p>Data provided to <code>TextDecoder()</code> API was invalid according to the encoding 1247provided.</p> 1248<p><a id="ERR_ENCODING_NOT_SUPPORTED"></a></p> 1249<h4><code>ERR_ENCODING_NOT_SUPPORTED</code><span><a class="mark" href="#errors_err_encoding_not_supported" id="errors_err_encoding_not_supported">#</a></span></h4> 1250<p>Encoding provided to <code>TextDecoder()</code> API was not one of the 1251<a href="util.html#util_whatwg_supported_encodings">WHATWG Supported Encodings</a>.</p> 1252<p><a id="ERR_EVAL_ESM_CANNOT_PRINT"></a></p> 1253<h4><code>ERR_EVAL_ESM_CANNOT_PRINT</code><span><a class="mark" href="#errors_err_eval_esm_cannot_print" id="errors_err_eval_esm_cannot_print">#</a></span></h4> 1254<p><code>--print</code> cannot be used with ESM input.</p> 1255<p><a id="ERR_EVENT_RECURSION"></a></p> 1256<h4><code>ERR_EVENT_RECURSION</code><span><a class="mark" href="#errors_err_event_recursion" id="errors_err_event_recursion">#</a></span></h4> 1257<p>Thrown when an attempt is made to recursively dispatch an event on <code>EventTarget</code>.</p> 1258<p><a id="ERR_EXECUTION_ENVIRONMENT_NOT_AVAILABLE"></a></p> 1259<h4><code>ERR_EXECUTION_ENVIRONMENT_NOT_AVAILABLE</code><span><a class="mark" href="#errors_err_execution_environment_not_available" id="errors_err_execution_environment_not_available">#</a></span></h4> 1260<p>The JS execution context is not associated with a Node.js environment. 1261This may occur when Node.js is used as an embedded library and some hooks 1262for the JS engine are not set up properly.</p> 1263<p><a id="ERR_FALSY_VALUE_REJECTION"></a></p> 1264<h4><code>ERR_FALSY_VALUE_REJECTION</code><span><a class="mark" href="#errors_err_falsy_value_rejection" id="errors_err_falsy_value_rejection">#</a></span></h4> 1265<p>A <code>Promise</code> that was callbackified via <code>util.callbackify()</code> was rejected with a 1266falsy value.</p> 1267<p><a id="ERR_FEATURE_UNAVAILABLE_ON_PLATFORM"></a></p> 1268<h4><code>ERR_FEATURE_UNAVAILABLE_ON_PLATFORM</code><span><a class="mark" href="#errors_err_feature_unavailable_on_platform" id="errors_err_feature_unavailable_on_platform">#</a></span></h4> 1269<div class="api_metadata"> 1270<span>Added in: v14.0.0</span> 1271</div> 1272<p>Used when a feature that is not available 1273to the current platform which is running Node.js is used.</p> 1274<p><a id="ERR_FS_EISDIR"></a></p> 1275<h4><code>ERR_FS_EISDIR</code><span><a class="mark" href="#errors_err_fs_eisdir" id="errors_err_fs_eisdir">#</a></span></h4> 1276<p>Path is a directory.</p> 1277<p><a id="ERR_FS_FILE_TOO_LARGE"></a></p> 1278<h4><code>ERR_FS_FILE_TOO_LARGE</code><span><a class="mark" href="#errors_err_fs_file_too_large" id="errors_err_fs_file_too_large">#</a></span></h4> 1279<p>An attempt has been made to read a file whose size is larger than the maximum 1280allowed size for a <code>Buffer</code>.</p> 1281<p><a id="ERR_FS_INVALID_SYMLINK_TYPE"></a></p> 1282<h4><code>ERR_FS_INVALID_SYMLINK_TYPE</code><span><a class="mark" href="#errors_err_fs_invalid_symlink_type" id="errors_err_fs_invalid_symlink_type">#</a></span></h4> 1283<p>An invalid symlink type was passed to the <a href="fs.html#fs_fs_symlink_target_path_type_callback"><code>fs.symlink()</code></a> or 1284<a href="fs.html#fs_fs_symlinksync_target_path_type"><code>fs.symlinkSync()</code></a> methods.</p> 1285<p><a id="ERR_HTTP_HEADERS_SENT"></a></p> 1286<h4><code>ERR_HTTP_HEADERS_SENT</code><span><a class="mark" href="#errors_err_http_headers_sent" id="errors_err_http_headers_sent">#</a></span></h4> 1287<p>An attempt was made to add more headers after the headers had already been sent.</p> 1288<p><a id="ERR_HTTP_INVALID_HEADER_VALUE"></a></p> 1289<h4><code>ERR_HTTP_INVALID_HEADER_VALUE</code><span><a class="mark" href="#errors_err_http_invalid_header_value" id="errors_err_http_invalid_header_value">#</a></span></h4> 1290<p>An invalid HTTP header value was specified.</p> 1291<p><a id="ERR_HTTP_INVALID_STATUS_CODE"></a></p> 1292<h4><code>ERR_HTTP_INVALID_STATUS_CODE</code><span><a class="mark" href="#errors_err_http_invalid_status_code" id="errors_err_http_invalid_status_code">#</a></span></h4> 1293<p>Status code was outside the regular status code range (100-999).</p> 1294<p><a id="ERR_HTTP_TRAILER_INVALID"></a></p> 1295<h4><code>ERR_HTTP_TRAILER_INVALID</code><span><a class="mark" href="#errors_err_http_trailer_invalid" id="errors_err_http_trailer_invalid">#</a></span></h4> 1296<p>The <code>Trailer</code> header was set even though the transfer encoding does not support 1297that.</p> 1298<p><a id="ERR_HTTP2_ALTSVC_INVALID_ORIGIN"></a></p> 1299<h4><code>ERR_HTTP2_ALTSVC_INVALID_ORIGIN</code><span><a class="mark" href="#errors_err_http2_altsvc_invalid_origin" id="errors_err_http2_altsvc_invalid_origin">#</a></span></h4> 1300<p>HTTP/2 ALTSVC frames require a valid origin.</p> 1301<p><a id="ERR_HTTP2_ALTSVC_LENGTH"></a></p> 1302<h4><code>ERR_HTTP2_ALTSVC_LENGTH</code><span><a class="mark" href="#errors_err_http2_altsvc_length" id="errors_err_http2_altsvc_length">#</a></span></h4> 1303<p>HTTP/2 ALTSVC frames are limited to a maximum of 16,382 payload bytes.</p> 1304<p><a id="ERR_HTTP2_CONNECT_AUTHORITY"></a></p> 1305<h4><code>ERR_HTTP2_CONNECT_AUTHORITY</code><span><a class="mark" href="#errors_err_http2_connect_authority" id="errors_err_http2_connect_authority">#</a></span></h4> 1306<p>For HTTP/2 requests using the <code>CONNECT</code> method, the <code>:authority</code> pseudo-header 1307is required.</p> 1308<p><a id="ERR_HTTP2_CONNECT_PATH"></a></p> 1309<h4><code>ERR_HTTP2_CONNECT_PATH</code><span><a class="mark" href="#errors_err_http2_connect_path" id="errors_err_http2_connect_path">#</a></span></h4> 1310<p>For HTTP/2 requests using the <code>CONNECT</code> method, the <code>:path</code> pseudo-header is 1311forbidden.</p> 1312<p><a id="ERR_HTTP2_CONNECT_SCHEME"></a></p> 1313<h4><code>ERR_HTTP2_CONNECT_SCHEME</code><span><a class="mark" href="#errors_err_http2_connect_scheme" id="errors_err_http2_connect_scheme">#</a></span></h4> 1314<p>For HTTP/2 requests using the <code>CONNECT</code> method, the <code>:scheme</code> pseudo-header is 1315forbidden.</p> 1316<p><a id="ERR_HTTP2_ERROR"></a></p> 1317<h4><code>ERR_HTTP2_ERROR</code><span><a class="mark" href="#errors_err_http2_error" id="errors_err_http2_error">#</a></span></h4> 1318<p>A non-specific HTTP/2 error has occurred.</p> 1319<p><a id="ERR_HTTP2_GOAWAY_SESSION"></a></p> 1320<h4><code>ERR_HTTP2_GOAWAY_SESSION</code><span><a class="mark" href="#errors_err_http2_goaway_session" id="errors_err_http2_goaway_session">#</a></span></h4> 1321<p>New HTTP/2 Streams may not be opened after the <code>Http2Session</code> has received a 1322<code>GOAWAY</code> frame from the connected peer.</p> 1323<p><a id="ERR_HTTP2_HEADER_SINGLE_VALUE"></a></p> 1324<h4><code>ERR_HTTP2_HEADER_SINGLE_VALUE</code><span><a class="mark" href="#errors_err_http2_header_single_value" id="errors_err_http2_header_single_value">#</a></span></h4> 1325<p>Multiple values were provided for an HTTP/2 header field that was required to 1326have only a single value.</p> 1327<p><a id="ERR_HTTP2_HEADERS_AFTER_RESPOND"></a></p> 1328<h4><code>ERR_HTTP2_HEADERS_AFTER_RESPOND</code><span><a class="mark" href="#errors_err_http2_headers_after_respond" id="errors_err_http2_headers_after_respond">#</a></span></h4> 1329<p>An additional headers was specified after an HTTP/2 response was initiated.</p> 1330<p><a id="ERR_HTTP2_HEADERS_SENT"></a></p> 1331<h4><code>ERR_HTTP2_HEADERS_SENT</code><span><a class="mark" href="#errors_err_http2_headers_sent" id="errors_err_http2_headers_sent">#</a></span></h4> 1332<p>An attempt was made to send multiple response headers.</p> 1333<p><a id="ERR_HTTP2_INFO_STATUS_NOT_ALLOWED"></a></p> 1334<h4><code>ERR_HTTP2_INFO_STATUS_NOT_ALLOWED</code><span><a class="mark" href="#errors_err_http2_info_status_not_allowed" id="errors_err_http2_info_status_not_allowed">#</a></span></h4> 1335<p>Informational HTTP status codes (<code>1xx</code>) may not be set as the response status 1336code on HTTP/2 responses.</p> 1337<p><a id="ERR_HTTP2_INVALID_CONNECTION_HEADERS"></a></p> 1338<h4><code>ERR_HTTP2_INVALID_CONNECTION_HEADERS</code><span><a class="mark" href="#errors_err_http2_invalid_connection_headers" id="errors_err_http2_invalid_connection_headers">#</a></span></h4> 1339<p>HTTP/1 connection specific headers are forbidden to be used in HTTP/2 1340requests and responses.</p> 1341<p><a id="ERR_HTTP2_INVALID_HEADER_VALUE"></a></p> 1342<h4><code>ERR_HTTP2_INVALID_HEADER_VALUE</code><span><a class="mark" href="#errors_err_http2_invalid_header_value" id="errors_err_http2_invalid_header_value">#</a></span></h4> 1343<p>An invalid HTTP/2 header value was specified.</p> 1344<p><a id="ERR_HTTP2_INVALID_INFO_STATUS"></a></p> 1345<h4><code>ERR_HTTP2_INVALID_INFO_STATUS</code><span><a class="mark" href="#errors_err_http2_invalid_info_status" id="errors_err_http2_invalid_info_status">#</a></span></h4> 1346<p>An invalid HTTP informational status code has been specified. Informational 1347status codes must be an integer between <code>100</code> and <code>199</code> (inclusive).</p> 1348<p><a id="ERR_HTTP2_INVALID_ORIGIN"></a></p> 1349<h4><code>ERR_HTTP2_INVALID_ORIGIN</code><span><a class="mark" href="#errors_err_http2_invalid_origin" id="errors_err_http2_invalid_origin">#</a></span></h4> 1350<p>HTTP/2 <code>ORIGIN</code> frames require a valid origin.</p> 1351<p><a id="ERR_HTTP2_INVALID_PACKED_SETTINGS_LENGTH"></a></p> 1352<h4><code>ERR_HTTP2_INVALID_PACKED_SETTINGS_LENGTH</code><span><a class="mark" href="#errors_err_http2_invalid_packed_settings_length" id="errors_err_http2_invalid_packed_settings_length">#</a></span></h4> 1353<p>Input <code>Buffer</code> and <code>Uint8Array</code> instances passed to the 1354<code>http2.getUnpackedSettings()</code> API must have a length that is a multiple of 1355six.</p> 1356<p><a id="ERR_HTTP2_INVALID_PSEUDOHEADER"></a></p> 1357<h4><code>ERR_HTTP2_INVALID_PSEUDOHEADER</code><span><a class="mark" href="#errors_err_http2_invalid_pseudoheader" id="errors_err_http2_invalid_pseudoheader">#</a></span></h4> 1358<p>Only valid HTTP/2 pseudoheaders (<code>:status</code>, <code>:path</code>, <code>:authority</code>, <code>:scheme</code>, 1359and <code>:method</code>) may be used.</p> 1360<p><a id="ERR_HTTP2_INVALID_SESSION"></a></p> 1361<h4><code>ERR_HTTP2_INVALID_SESSION</code><span><a class="mark" href="#errors_err_http2_invalid_session" id="errors_err_http2_invalid_session">#</a></span></h4> 1362<p>An action was performed on an <code>Http2Session</code> object that had already been 1363destroyed.</p> 1364<p><a id="ERR_HTTP2_INVALID_SETTING_VALUE"></a></p> 1365<h4><code>ERR_HTTP2_INVALID_SETTING_VALUE</code><span><a class="mark" href="#errors_err_http2_invalid_setting_value" id="errors_err_http2_invalid_setting_value">#</a></span></h4> 1366<p>An invalid value has been specified for an HTTP/2 setting.</p> 1367<p><a id="ERR_HTTP2_INVALID_STREAM"></a></p> 1368<h4><code>ERR_HTTP2_INVALID_STREAM</code><span><a class="mark" href="#errors_err_http2_invalid_stream" id="errors_err_http2_invalid_stream">#</a></span></h4> 1369<p>An operation was performed on a stream that had already been destroyed.</p> 1370<p><a id="ERR_HTTP2_MAX_PENDING_SETTINGS_ACK"></a></p> 1371<h4><code>ERR_HTTP2_MAX_PENDING_SETTINGS_ACK</code><span><a class="mark" href="#errors_err_http2_max_pending_settings_ack" id="errors_err_http2_max_pending_settings_ack">#</a></span></h4> 1372<p>Whenever an HTTP/2 <code>SETTINGS</code> frame is sent to a connected peer, the peer is 1373required to send an acknowledgment that it has received and applied the new 1374<code>SETTINGS</code>. By default, a maximum number of unacknowledged <code>SETTINGS</code> frames may 1375be sent at any given time. This error code is used when that limit has been 1376reached.</p> 1377<p><a id="ERR_HTTP2_NESTED_PUSH"></a></p> 1378<h4><code>ERR_HTTP2_NESTED_PUSH</code><span><a class="mark" href="#errors_err_http2_nested_push" id="errors_err_http2_nested_push">#</a></span></h4> 1379<p>An attempt was made to initiate a new push stream from within a push stream. 1380Nested push streams are not permitted.</p> 1381<p><a id="ERR_HTTP2_NO_MEM"></a></p> 1382<h4><code>ERR_HTTP2_NO_MEM</code><span><a class="mark" href="#errors_err_http2_no_mem" id="errors_err_http2_no_mem">#</a></span></h4> 1383<p>Out of memory when using the <code>http2session.setLocalWindowSize(windowSize)</code> API.</p> 1384<p><a id="ERR_HTTP2_NO_SOCKET_MANIPULATION"></a></p> 1385<h4><code>ERR_HTTP2_NO_SOCKET_MANIPULATION</code><span><a class="mark" href="#errors_err_http2_no_socket_manipulation" id="errors_err_http2_no_socket_manipulation">#</a></span></h4> 1386<p>An attempt was made to directly manipulate (read, write, pause, resume, etc.) a 1387socket attached to an <code>Http2Session</code>.</p> 1388<p><a id="ERR_HTTP2_ORIGIN_LENGTH"></a></p> 1389<h4><code>ERR_HTTP2_ORIGIN_LENGTH</code><span><a class="mark" href="#errors_err_http2_origin_length" id="errors_err_http2_origin_length">#</a></span></h4> 1390<p>HTTP/2 <code>ORIGIN</code> frames are limited to a length of 16382 bytes.</p> 1391<p><a id="ERR_HTTP2_OUT_OF_STREAMS"></a></p> 1392<h4><code>ERR_HTTP2_OUT_OF_STREAMS</code><span><a class="mark" href="#errors_err_http2_out_of_streams" id="errors_err_http2_out_of_streams">#</a></span></h4> 1393<p>The number of streams created on a single HTTP/2 session reached the maximum 1394limit.</p> 1395<p><a id="ERR_HTTP2_PAYLOAD_FORBIDDEN"></a></p> 1396<h4><code>ERR_HTTP2_PAYLOAD_FORBIDDEN</code><span><a class="mark" href="#errors_err_http2_payload_forbidden" id="errors_err_http2_payload_forbidden">#</a></span></h4> 1397<p>A message payload was specified for an HTTP response code for which a payload is 1398forbidden.</p> 1399<p><a id="ERR_HTTP2_PING_CANCEL"></a></p> 1400<h4><code>ERR_HTTP2_PING_CANCEL</code><span><a class="mark" href="#errors_err_http2_ping_cancel" id="errors_err_http2_ping_cancel">#</a></span></h4> 1401<p>An HTTP/2 ping was canceled.</p> 1402<p><a id="ERR_HTTP2_PING_LENGTH"></a></p> 1403<h4><code>ERR_HTTP2_PING_LENGTH</code><span><a class="mark" href="#errors_err_http2_ping_length" id="errors_err_http2_ping_length">#</a></span></h4> 1404<p>HTTP/2 ping payloads must be exactly 8 bytes in length.</p> 1405<p><a id="ERR_HTTP2_PSEUDOHEADER_NOT_ALLOWED"></a></p> 1406<h4><code>ERR_HTTP2_PSEUDOHEADER_NOT_ALLOWED</code><span><a class="mark" href="#errors_err_http2_pseudoheader_not_allowed" id="errors_err_http2_pseudoheader_not_allowed">#</a></span></h4> 1407<p>An HTTP/2 pseudo-header has been used inappropriately. Pseudo-headers are header 1408key names that begin with the <code>:</code> prefix.</p> 1409<p><a id="ERR_HTTP2_PUSH_DISABLED"></a></p> 1410<h4><code>ERR_HTTP2_PUSH_DISABLED</code><span><a class="mark" href="#errors_err_http2_push_disabled" id="errors_err_http2_push_disabled">#</a></span></h4> 1411<p>An attempt was made to create a push stream, which had been disabled by the 1412client.</p> 1413<p><a id="ERR_HTTP2_SEND_FILE"></a></p> 1414<h4><code>ERR_HTTP2_SEND_FILE</code><span><a class="mark" href="#errors_err_http2_send_file" id="errors_err_http2_send_file">#</a></span></h4> 1415<p>An attempt was made to use the <code>Http2Stream.prototype.responseWithFile()</code> API to 1416send a directory.</p> 1417<p><a id="ERR_HTTP2_SEND_FILE_NOSEEK"></a></p> 1418<h4><code>ERR_HTTP2_SEND_FILE_NOSEEK</code><span><a class="mark" href="#errors_err_http2_send_file_noseek" id="errors_err_http2_send_file_noseek">#</a></span></h4> 1419<p>An attempt was made to use the <code>Http2Stream.prototype.responseWithFile()</code> API to 1420send something other than a regular file, but <code>offset</code> or <code>length</code> options were 1421provided.</p> 1422<p><a id="ERR_HTTP2_SESSION_ERROR"></a></p> 1423<h4><code>ERR_HTTP2_SESSION_ERROR</code><span><a class="mark" href="#errors_err_http2_session_error" id="errors_err_http2_session_error">#</a></span></h4> 1424<p>The <code>Http2Session</code> closed with a non-zero error code.</p> 1425<p><a id="ERR_HTTP2_SETTINGS_CANCEL"></a></p> 1426<h4><code>ERR_HTTP2_SETTINGS_CANCEL</code><span><a class="mark" href="#errors_err_http2_settings_cancel" id="errors_err_http2_settings_cancel">#</a></span></h4> 1427<p>The <code>Http2Session</code> settings canceled.</p> 1428<p><a id="ERR_HTTP2_SOCKET_BOUND"></a></p> 1429<h4><code>ERR_HTTP2_SOCKET_BOUND</code><span><a class="mark" href="#errors_err_http2_socket_bound" id="errors_err_http2_socket_bound">#</a></span></h4> 1430<p>An attempt was made to connect a <code>Http2Session</code> object to a <code>net.Socket</code> or 1431<code>tls.TLSSocket</code> that had already been bound to another <code>Http2Session</code> object.</p> 1432<p><a id="ERR_HTTP2_SOCKET_UNBOUND"></a></p> 1433<h4><code>ERR_HTTP2_SOCKET_UNBOUND</code><span><a class="mark" href="#errors_err_http2_socket_unbound" id="errors_err_http2_socket_unbound">#</a></span></h4> 1434<p>An attempt was made to use the <code>socket</code> property of an <code>Http2Session</code> that 1435has already been closed.</p> 1436<p><a id="ERR_HTTP2_STATUS_101"></a></p> 1437<h4><code>ERR_HTTP2_STATUS_101</code><span><a class="mark" href="#errors_err_http2_status_101" id="errors_err_http2_status_101">#</a></span></h4> 1438<p>Use of the <code>101</code> Informational status code is forbidden in HTTP/2.</p> 1439<p><a id="ERR_HTTP2_STATUS_INVALID"></a></p> 1440<h4><code>ERR_HTTP2_STATUS_INVALID</code><span><a class="mark" href="#errors_err_http2_status_invalid" id="errors_err_http2_status_invalid">#</a></span></h4> 1441<p>An invalid HTTP status code has been specified. Status codes must be an integer 1442between <code>100</code> and <code>599</code> (inclusive).</p> 1443<p><a id="ERR_HTTP2_STREAM_CANCEL"></a></p> 1444<h4><code>ERR_HTTP2_STREAM_CANCEL</code><span><a class="mark" href="#errors_err_http2_stream_cancel" id="errors_err_http2_stream_cancel">#</a></span></h4> 1445<p>An <code>Http2Stream</code> was destroyed before any data was transmitted to the connected 1446peer.</p> 1447<p><a id="ERR_HTTP2_STREAM_ERROR"></a></p> 1448<h4><code>ERR_HTTP2_STREAM_ERROR</code><span><a class="mark" href="#errors_err_http2_stream_error" id="errors_err_http2_stream_error">#</a></span></h4> 1449<p>A non-zero error code was been specified in an <code>RST_STREAM</code> frame.</p> 1450<p><a id="ERR_HTTP2_STREAM_SELF_DEPENDENCY"></a></p> 1451<h4><code>ERR_HTTP2_STREAM_SELF_DEPENDENCY</code><span><a class="mark" href="#errors_err_http2_stream_self_dependency" id="errors_err_http2_stream_self_dependency">#</a></span></h4> 1452<p>When setting the priority for an HTTP/2 stream, the stream may be marked as 1453a dependency for a parent stream. This error code is used when an attempt is 1454made to mark a stream and dependent of itself.</p> 1455<p><a id="ERR_HTTP2_TRAILERS_ALREADY_SENT"></a></p> 1456<h4><code>ERR_HTTP2_TRAILERS_ALREADY_SENT</code><span><a class="mark" href="#errors_err_http2_trailers_already_sent" id="errors_err_http2_trailers_already_sent">#</a></span></h4> 1457<p>Trailing headers have already been sent on the <code>Http2Stream</code>.</p> 1458<p><a id="ERR_HTTP2_TRAILERS_NOT_READY"></a></p> 1459<h4><code>ERR_HTTP2_TRAILERS_NOT_READY</code><span><a class="mark" href="#errors_err_http2_trailers_not_ready" id="errors_err_http2_trailers_not_ready">#</a></span></h4> 1460<p>The <code>http2stream.sendTrailers()</code> method cannot be called until after the 1461<code>'wantTrailers'</code> event is emitted on an <code>Http2Stream</code> object. The 1462<code>'wantTrailers'</code> event will only be emitted if the <code>waitForTrailers</code> option 1463is set for the <code>Http2Stream</code>.</p> 1464<p><a id="ERR_HTTP2_UNSUPPORTED_PROTOCOL"></a></p> 1465<h4><code>ERR_HTTP2_UNSUPPORTED_PROTOCOL</code><span><a class="mark" href="#errors_err_http2_unsupported_protocol" id="errors_err_http2_unsupported_protocol">#</a></span></h4> 1466<p><code>http2.connect()</code> was passed a URL that uses any protocol other than <code>http:</code> or 1467<code>https:</code>.</p> 1468<p><a id="ERR_INCOMPATIBLE_OPTION_PAIR"></a></p> 1469<h4><code>ERR_INCOMPATIBLE_OPTION_PAIR</code><span><a class="mark" href="#errors_err_incompatible_option_pair" id="errors_err_incompatible_option_pair">#</a></span></h4> 1470<p>An option pair is incompatible with each other and cannot be used at the same 1471time.</p> 1472<p><a id="ERR_INPUT_TYPE_NOT_ALLOWED"></a></p> 1473<h4><code>ERR_INPUT_TYPE_NOT_ALLOWED</code><span><a class="mark" href="#errors_err_input_type_not_allowed" id="errors_err_input_type_not_allowed">#</a></span></h4> 1474<p></p><div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><p></p> 1475<p>The <code>--input-type</code> flag was used to attempt to execute a file. This flag can 1476only be used with input via <code>--eval</code>, <code>--print</code> or <code>STDIN</code>.</p> 1477<p><a id="ERR_INSPECTOR_ALREADY_ACTIVATED"></a></p> 1478<h4><code>ERR_INSPECTOR_ALREADY_ACTIVATED</code><span><a class="mark" href="#errors_err_inspector_already_activated" id="errors_err_inspector_already_activated">#</a></span></h4> 1479<p>While using the <code>inspector</code> module, an attempt was made to activate the 1480inspector when it already started to listen on a port. Use <code>inspector.close()</code> 1481before activating it on a different address.</p> 1482<p><a id="ERR_INSPECTOR_ALREADY_CONNECTED"></a></p> 1483<h4><code>ERR_INSPECTOR_ALREADY_CONNECTED</code><span><a class="mark" href="#errors_err_inspector_already_connected" id="errors_err_inspector_already_connected">#</a></span></h4> 1484<p>While using the <code>inspector</code> module, an attempt was made to connect when the 1485inspector was already connected.</p> 1486<p><a id="ERR_INSPECTOR_CLOSED"></a></p> 1487<h4><code>ERR_INSPECTOR_CLOSED</code><span><a class="mark" href="#errors_err_inspector_closed" id="errors_err_inspector_closed">#</a></span></h4> 1488<p>While using the <code>inspector</code> module, an attempt was made to use the inspector 1489after the session had already closed.</p> 1490<p><a id="ERR_INSPECTOR_COMMAND"></a></p> 1491<h4><code>ERR_INSPECTOR_COMMAND</code><span><a class="mark" href="#errors_err_inspector_command" id="errors_err_inspector_command">#</a></span></h4> 1492<p>An error occurred while issuing a command via the <code>inspector</code> module.</p> 1493<p><a id="ERR_INSPECTOR_NOT_ACTIVE"></a></p> 1494<h4><code>ERR_INSPECTOR_NOT_ACTIVE</code><span><a class="mark" href="#errors_err_inspector_not_active" id="errors_err_inspector_not_active">#</a></span></h4> 1495<p>The <code>inspector</code> is not active when <code>inspector.waitForDebugger()</code> is called.</p> 1496<p><a id="ERR_INSPECTOR_NOT_AVAILABLE"></a></p> 1497<h4><code>ERR_INSPECTOR_NOT_AVAILABLE</code><span><a class="mark" href="#errors_err_inspector_not_available" id="errors_err_inspector_not_available">#</a></span></h4> 1498<p>The <code>inspector</code> module is not available for use.</p> 1499<p><a id="ERR_INSPECTOR_NOT_CONNECTED"></a></p> 1500<h4><code>ERR_INSPECTOR_NOT_CONNECTED</code><span><a class="mark" href="#errors_err_inspector_not_connected" id="errors_err_inspector_not_connected">#</a></span></h4> 1501<p>While using the <code>inspector</code> module, an attempt was made to use the inspector 1502before it was connected.</p> 1503<p><a id="ERR_INSPECTOR_NOT_WORKER"></a></p> 1504<h4><code>ERR_INSPECTOR_NOT_WORKER</code><span><a class="mark" href="#errors_err_inspector_not_worker" id="errors_err_inspector_not_worker">#</a></span></h4> 1505<p>An API was called on the main thread that can only be used from 1506the worker thread.</p> 1507<p><a id="ERR_INTERNAL_ASSERTION"></a></p> 1508<h4><code>ERR_INTERNAL_ASSERTION</code><span><a class="mark" href="#errors_err_internal_assertion" id="errors_err_internal_assertion">#</a></span></h4> 1509<p>There was a bug in Node.js or incorrect usage of Node.js internals. 1510To fix the error, open an issue at <a href="https://github.com/nodejs/node/issues">https://github.com/nodejs/node/issues</a>.</p> 1511<p><a id="ERR_INVALID_ADDRESS_FAMILY"></a></p> 1512<h4><code>ERR_INVALID_ADDRESS_FAMILY</code><span><a class="mark" href="#errors_err_invalid_address_family" id="errors_err_invalid_address_family">#</a></span></h4> 1513<p>The provided address family is not understood by the Node.js API.</p> 1514<p><a id="ERR_INVALID_ARG_TYPE"></a></p> 1515<h4><code>ERR_INVALID_ARG_TYPE</code><span><a class="mark" href="#errors_err_invalid_arg_type" id="errors_err_invalid_arg_type">#</a></span></h4> 1516<p>An argument of the wrong type was passed to a Node.js API.</p> 1517<p><a id="ERR_INVALID_ARG_VALUE"></a></p> 1518<h4><code>ERR_INVALID_ARG_VALUE</code><span><a class="mark" href="#errors_err_invalid_arg_value" id="errors_err_invalid_arg_value">#</a></span></h4> 1519<p>An invalid or unsupported value was passed for a given argument.</p> 1520<p><a id="ERR_INVALID_ASYNC_ID"></a></p> 1521<h4><code>ERR_INVALID_ASYNC_ID</code><span><a class="mark" href="#errors_err_invalid_async_id" id="errors_err_invalid_async_id">#</a></span></h4> 1522<p>An invalid <code>asyncId</code> or <code>triggerAsyncId</code> was passed using <code>AsyncHooks</code>. An id 1523less than -1 should never happen.</p> 1524<p><a id="ERR_INVALID_BUFFER_SIZE"></a></p> 1525<h4><code>ERR_INVALID_BUFFER_SIZE</code><span><a class="mark" href="#errors_err_invalid_buffer_size" id="errors_err_invalid_buffer_size">#</a></span></h4> 1526<p>A swap was performed on a <code>Buffer</code> but its size was not compatible with the 1527operation.</p> 1528<p><a id="ERR_INVALID_CALLBACK"></a></p> 1529<h4><code>ERR_INVALID_CALLBACK</code><span><a class="mark" href="#errors_err_invalid_callback" id="errors_err_invalid_callback">#</a></span></h4> 1530<p>A callback function was required but was not been provided to a Node.js API.</p> 1531<p><a id="ERR_INVALID_CHAR"></a></p> 1532<h4><code>ERR_INVALID_CHAR</code><span><a class="mark" href="#errors_err_invalid_char" id="errors_err_invalid_char">#</a></span></h4> 1533<p>Invalid characters were detected in headers.</p> 1534<p><a id="ERR_INVALID_CURSOR_POS"></a></p> 1535<h4><code>ERR_INVALID_CURSOR_POS</code><span><a class="mark" href="#errors_err_invalid_cursor_pos" id="errors_err_invalid_cursor_pos">#</a></span></h4> 1536<p>A cursor on a given stream cannot be moved to a specified row without a 1537specified column.</p> 1538<p><a id="ERR_INVALID_FD"></a></p> 1539<h4><code>ERR_INVALID_FD</code><span><a class="mark" href="#errors_err_invalid_fd" id="errors_err_invalid_fd">#</a></span></h4> 1540<p>A file descriptor ('fd') was not valid (e.g. it was a negative value).</p> 1541<p><a id="ERR_INVALID_FD_TYPE"></a></p> 1542<h4><code>ERR_INVALID_FD_TYPE</code><span><a class="mark" href="#errors_err_invalid_fd_type" id="errors_err_invalid_fd_type">#</a></span></h4> 1543<p>A file descriptor ('fd') type was not valid.</p> 1544<p><a id="ERR_INVALID_FILE_URL_HOST"></a></p> 1545<h4><code>ERR_INVALID_FILE_URL_HOST</code><span><a class="mark" href="#errors_err_invalid_file_url_host" id="errors_err_invalid_file_url_host">#</a></span></h4> 1546<p>A Node.js API that consumes <code>file:</code> URLs (such as certain functions in the 1547<a href="fs.html"><code>fs</code></a> module) encountered a file URL with an incompatible host. This 1548situation can only occur on Unix-like systems where only <code>localhost</code> or an empty 1549host is supported.</p> 1550<p><a id="ERR_INVALID_FILE_URL_PATH"></a></p> 1551<h4><code>ERR_INVALID_FILE_URL_PATH</code><span><a class="mark" href="#errors_err_invalid_file_url_path" id="errors_err_invalid_file_url_path">#</a></span></h4> 1552<p>A Node.js API that consumes <code>file:</code> URLs (such as certain functions in the 1553<a href="fs.html"><code>fs</code></a> module) encountered a file URL with an incompatible path. The exact 1554semantics for determining whether a path can be used is platform-dependent.</p> 1555<p><a id="ERR_INVALID_HANDLE_TYPE"></a></p> 1556<h4><code>ERR_INVALID_HANDLE_TYPE</code><span><a class="mark" href="#errors_err_invalid_handle_type" id="errors_err_invalid_handle_type">#</a></span></h4> 1557<p>An attempt was made to send an unsupported "handle" over an IPC communication 1558channel to a child process. See <a href="child_process.html#child_process_subprocess_send_message_sendhandle_options_callback"><code>subprocess.send()</code></a> and <a href="process.html#process_process_send_message_sendhandle_options_callback"><code>process.send()</code></a> 1559for more information.</p> 1560<p><a id="ERR_INVALID_HTTP_TOKEN"></a></p> 1561<h4><code>ERR_INVALID_HTTP_TOKEN</code><span><a class="mark" href="#errors_err_invalid_http_token" id="errors_err_invalid_http_token">#</a></span></h4> 1562<p>An invalid HTTP token was supplied.</p> 1563<p><a id="ERR_INVALID_IP_ADDRESS"></a></p> 1564<h4><code>ERR_INVALID_IP_ADDRESS</code><span><a class="mark" href="#errors_err_invalid_ip_address" id="errors_err_invalid_ip_address">#</a></span></h4> 1565<p>An IP address is not valid.</p> 1566<p><a id="ERR_INVALID_MODULE"></a></p> 1567<h4><code>ERR_INVALID_MODULE</code><span><a class="mark" href="#errors_err_invalid_module" id="errors_err_invalid_module">#</a></span></h4> 1568<div class="api_metadata"> 1569<span>Added in: v14.18.0</span> 1570</div> 1571<p>An attempt was made to load a module that does not exist or was otherwise not 1572valid.</p> 1573<p><a id="ERR_INVALID_MODULE_SPECIFIER"></a></p> 1574<h4><code>ERR_INVALID_MODULE_SPECIFIER</code><span><a class="mark" href="#errors_err_invalid_module_specifier" id="errors_err_invalid_module_specifier">#</a></span></h4> 1575<p>The imported module string is an invalid URL, package name, or package subpath 1576specifier.</p> 1577<p><a id="ERR_INVALID_OPT_VALUE"></a></p> 1578<h4><code>ERR_INVALID_OPT_VALUE</code><span><a class="mark" href="#errors_err_invalid_opt_value" id="errors_err_invalid_opt_value">#</a></span></h4> 1579<p>An invalid or unexpected value was passed in an options object.</p> 1580<p><a id="ERR_INVALID_OPT_VALUE_ENCODING"></a></p> 1581<h4><code>ERR_INVALID_OPT_VALUE_ENCODING</code><span><a class="mark" href="#errors_err_invalid_opt_value_encoding" id="errors_err_invalid_opt_value_encoding">#</a></span></h4> 1582<p>An invalid or unknown file encoding was passed.</p> 1583<p><a id="ERR_INVALID_PACKAGE_CONFIG"></a></p> 1584<h4><code>ERR_INVALID_PACKAGE_CONFIG</code><span><a class="mark" href="#errors_err_invalid_package_config" id="errors_err_invalid_package_config">#</a></span></h4> 1585<p>An invalid <a href="packages.html#packages_node_js_package_json_field_definitions"><code>package.json</code></a> file was found which failed parsing.</p> 1586<p><a id="ERR_INVALID_PACKAGE_TARGET"></a></p> 1587<h4><code>ERR_INVALID_PACKAGE_TARGET</code><span><a class="mark" href="#errors_err_invalid_package_target" id="errors_err_invalid_package_target">#</a></span></h4> 1588<p>The <code>package.json</code> <a href="packages.html#packages_exports"><code>"exports"</code></a> field contains an invalid target mapping 1589value for the attempted module resolution.</p> 1590<p><a id="ERR_INVALID_PERFORMANCE_MARK"></a></p> 1591<h4><code>ERR_INVALID_PERFORMANCE_MARK</code><span><a class="mark" href="#errors_err_invalid_performance_mark" id="errors_err_invalid_performance_mark">#</a></span></h4> 1592<p>While using the Performance Timing API (<code>perf_hooks</code>), a performance mark is 1593invalid.</p> 1594<p><a id="ERR_INVALID_PROTOCOL"></a></p> 1595<h4><code>ERR_INVALID_PROTOCOL</code><span><a class="mark" href="#errors_err_invalid_protocol" id="errors_err_invalid_protocol">#</a></span></h4> 1596<p>An invalid <code>options.protocol</code> was passed to <code>http.request()</code>.</p> 1597<p><a id="ERR_INVALID_REPL_EVAL_CONFIG"></a></p> 1598<h4><code>ERR_INVALID_REPL_EVAL_CONFIG</code><span><a class="mark" href="#errors_err_invalid_repl_eval_config" id="errors_err_invalid_repl_eval_config">#</a></span></h4> 1599<p>Both <code>breakEvalOnSigint</code> and <code>eval</code> options were set in the <a href="repl.html"><code>REPL</code></a> config, 1600which is not supported.</p> 1601<p><a id="ERR_INVALID_REPL_INPUT"></a></p> 1602<h4><code>ERR_INVALID_REPL_INPUT</code><span><a class="mark" href="#errors_err_invalid_repl_input" id="errors_err_invalid_repl_input">#</a></span></h4> 1603<p>The input may not be used in the <a href="repl.html"><code>REPL</code></a>. The conditions under which this 1604error is used are described in the <a href="repl.html"><code>REPL</code></a> documentation.</p> 1605<p><a id="ERR_INVALID_RETURN_PROPERTY"></a></p> 1606<h4><code>ERR_INVALID_RETURN_PROPERTY</code><span><a class="mark" href="#errors_err_invalid_return_property" id="errors_err_invalid_return_property">#</a></span></h4> 1607<p>Thrown in case a function option does not provide a valid value for one of its 1608returned object properties on execution.</p> 1609<p><a id="ERR_INVALID_RETURN_PROPERTY_VALUE"></a></p> 1610<h4><code>ERR_INVALID_RETURN_PROPERTY_VALUE</code><span><a class="mark" href="#errors_err_invalid_return_property_value" id="errors_err_invalid_return_property_value">#</a></span></h4> 1611<p>Thrown in case a function option does not provide an expected value 1612type for one of its returned object properties on execution.</p> 1613<p><a id="ERR_INVALID_RETURN_VALUE"></a></p> 1614<h4><code>ERR_INVALID_RETURN_VALUE</code><span><a class="mark" href="#errors_err_invalid_return_value" id="errors_err_invalid_return_value">#</a></span></h4> 1615<p>Thrown in case a function option does not return an expected value 1616type on execution, such as when a function is expected to return a promise.</p> 1617<p><a id="ERR_INVALID_SYNC_FORK_INPUT"></a></p> 1618<h4><code>ERR_INVALID_SYNC_FORK_INPUT</code><span><a class="mark" href="#errors_err_invalid_sync_fork_input" id="errors_err_invalid_sync_fork_input">#</a></span></h4> 1619<p>A <code>Buffer</code>, <code>TypedArray</code>, <code>DataView</code> or <code>string</code> was provided as stdio input to 1620an asynchronous fork. See the documentation for the <a href="child_process.html"><code>child_process</code></a> module 1621for more information.</p> 1622<p><a id="ERR_INVALID_THIS"></a></p> 1623<h4><code>ERR_INVALID_THIS</code><span><a class="mark" href="#errors_err_invalid_this" id="errors_err_invalid_this">#</a></span></h4> 1624<p>A Node.js API function was called with an incompatible <code>this</code> value.</p> 1625<pre><code class="language-js"><span class="hljs-keyword">const</span> urlSearchParams = <span class="hljs-keyword">new</span> <span class="hljs-title function_">URLSearchParams</span>(<span class="hljs-string">'foo=bar&baz=new'</span>); 1626 1627<span class="hljs-keyword">const</span> buf = <span class="hljs-title class_">Buffer</span>.<span class="hljs-title function_">alloc</span>(<span class="hljs-number">1</span>); 1628urlSearchParams.<span class="hljs-property">has</span>.<span class="hljs-title function_">call</span>(buf, <span class="hljs-string">'foo'</span>); 1629<span class="hljs-comment">// Throws a TypeError with code 'ERR_INVALID_THIS'</span></code></pre> 1630<p><a id="ERR_INVALID_TRANSFER_OBJECT"></a></p> 1631<h4><code>ERR_INVALID_TRANSFER_OBJECT</code><span><a class="mark" href="#errors_err_invalid_transfer_object" id="errors_err_invalid_transfer_object">#</a></span></h4> 1632<p>An invalid transfer object was passed to <code>postMessage()</code>.</p> 1633<p><a id="ERR_INVALID_TUPLE"></a></p> 1634<h4><code>ERR_INVALID_TUPLE</code><span><a class="mark" href="#errors_err_invalid_tuple" id="errors_err_invalid_tuple">#</a></span></h4> 1635<p>An element in the <code>iterable</code> provided to the <a href="url.html#url_the_whatwg_url_api">WHATWG</a> 1636<a href="url.html#url_new_urlsearchparams_iterable"><code>URLSearchParams</code> constructor</a> did not 1637represent a <code>[name, value]</code> tuple – that is, if an element is not iterable, or 1638does not consist of exactly two elements.</p> 1639<p><a id="ERR_INVALID_URI"></a></p> 1640<h4><code>ERR_INVALID_URI</code><span><a class="mark" href="#errors_err_invalid_uri" id="errors_err_invalid_uri">#</a></span></h4> 1641<p>An invalid URI was passed.</p> 1642<p><a id="ERR_INVALID_URL"></a></p> 1643<h4><code>ERR_INVALID_URL</code><span><a class="mark" href="#errors_err_invalid_url" id="errors_err_invalid_url">#</a></span></h4> 1644<p>An invalid URL was passed to the <a href="url.html#url_the_whatwg_url_api">WHATWG</a> 1645<a href="url.html#url_new_url_input_base"><code>URL</code> constructor</a> to be parsed. The thrown error object 1646typically has an additional property <code>'input'</code> that contains the URL that failed 1647to parse.</p> 1648<p><a id="ERR_INVALID_URL_SCHEME"></a></p> 1649<h4><code>ERR_INVALID_URL_SCHEME</code><span><a class="mark" href="#errors_err_invalid_url_scheme" id="errors_err_invalid_url_scheme">#</a></span></h4> 1650<p>An attempt was made to use a URL of an incompatible scheme (protocol) for a 1651specific purpose. It is only used in the <a href="url.html#url_the_whatwg_url_api">WHATWG URL API</a> support in the 1652<a href="fs.html"><code>fs</code></a> module (which only accepts URLs with <code>'file'</code> scheme), but may be used 1653in other Node.js APIs as well in the future.</p> 1654<p><a id="ERR_IPC_CHANNEL_CLOSED"></a></p> 1655<h4><code>ERR_IPC_CHANNEL_CLOSED</code><span><a class="mark" href="#errors_err_ipc_channel_closed" id="errors_err_ipc_channel_closed">#</a></span></h4> 1656<p>An attempt was made to use an IPC communication channel that was already closed.</p> 1657<p><a id="ERR_IPC_DISCONNECTED"></a></p> 1658<h4><code>ERR_IPC_DISCONNECTED</code><span><a class="mark" href="#errors_err_ipc_disconnected" id="errors_err_ipc_disconnected">#</a></span></h4> 1659<p>An attempt was made to disconnect an IPC communication channel that was already 1660disconnected. See the documentation for the <a href="child_process.html"><code>child_process</code></a> module 1661for more information.</p> 1662<p><a id="ERR_IPC_ONE_PIPE"></a></p> 1663<h4><code>ERR_IPC_ONE_PIPE</code><span><a class="mark" href="#errors_err_ipc_one_pipe" id="errors_err_ipc_one_pipe">#</a></span></h4> 1664<p>An attempt was made to create a child Node.js process using more than one IPC 1665communication channel. See the documentation for the <a href="child_process.html"><code>child_process</code></a> module 1666for more information.</p> 1667<p><a id="ERR_IPC_SYNC_FORK"></a></p> 1668<h4><code>ERR_IPC_SYNC_FORK</code><span><a class="mark" href="#errors_err_ipc_sync_fork" id="errors_err_ipc_sync_fork">#</a></span></h4> 1669<p>An attempt was made to open an IPC communication channel with a synchronously 1670forked Node.js process. See the documentation for the <a href="child_process.html"><code>child_process</code></a> module 1671for more information.</p> 1672<p><a id="ERR_MANIFEST_ASSERT_INTEGRITY"></a></p> 1673<h4><code>ERR_MANIFEST_ASSERT_INTEGRITY</code><span><a class="mark" href="#errors_err_manifest_assert_integrity" id="errors_err_manifest_assert_integrity">#</a></span></h4> 1674<p>An attempt was made to load a resource, but the resource did not match the 1675integrity defined by the policy manifest. See the documentation for <a href="policy.html">policy</a> 1676manifests for more information.</p> 1677<p><a id="ERR_MANIFEST_DEPENDENCY_MISSING"></a></p> 1678<h4><code>ERR_MANIFEST_DEPENDENCY_MISSING</code><span><a class="mark" href="#errors_err_manifest_dependency_missing" id="errors_err_manifest_dependency_missing">#</a></span></h4> 1679<p>An attempt was made to load a resource, but the resource was not listed as a 1680dependency from the location that attempted to load it. See the documentation 1681for <a href="policy.html">policy</a> manifests for more information.</p> 1682<p><a id="ERR_MANIFEST_INTEGRITY_MISMATCH"></a></p> 1683<h4><code>ERR_MANIFEST_INTEGRITY_MISMATCH</code><span><a class="mark" href="#errors_err_manifest_integrity_mismatch" id="errors_err_manifest_integrity_mismatch">#</a></span></h4> 1684<p>An attempt was made to load a policy manifest, but the manifest had multiple 1685entries for a resource which did not match each other. Update the manifest 1686entries to match in order to resolve this error. See the documentation for 1687<a href="policy.html">policy</a> manifests for more information.</p> 1688<p><a id="ERR_MANIFEST_INVALID_RESOURCE_FIELD"></a></p> 1689<h4><code>ERR_MANIFEST_INVALID_RESOURCE_FIELD</code><span><a class="mark" href="#errors_err_manifest_invalid_resource_field" id="errors_err_manifest_invalid_resource_field">#</a></span></h4> 1690<p>A policy manifest resource had an invalid value for one of its fields. Update 1691the manifest entry to match in order to resolve this error. See the 1692documentation for <a href="policy.html">policy</a> manifests for more information.</p> 1693<p><a id="ERR_MANIFEST_INVALID_SPECIFIER"></a></p> 1694<h4><code>ERR_MANIFEST_INVALID_SPECIFIER</code><span><a class="mark" href="#errors_err_manifest_invalid_specifier" id="errors_err_manifest_invalid_specifier">#</a></span></h4> 1695<p>A policy manifest resource had an invalid value for one of its dependency 1696mappings. Update the manifest entry to match to resolve this error. See the 1697documentation for <a href="policy.html">policy</a> manifests for more information.</p> 1698<p><a id="ERR_MANIFEST_PARSE_POLICY"></a></p> 1699<h4><code>ERR_MANIFEST_PARSE_POLICY</code><span><a class="mark" href="#errors_err_manifest_parse_policy" id="errors_err_manifest_parse_policy">#</a></span></h4> 1700<p>An attempt was made to load a policy manifest, but the manifest was unable to 1701be parsed. See the documentation for <a href="policy.html">policy</a> manifests for more information.</p> 1702<p><a id="ERR_MANIFEST_TDZ"></a></p> 1703<h4><code>ERR_MANIFEST_TDZ</code><span><a class="mark" href="#errors_err_manifest_tdz" id="errors_err_manifest_tdz">#</a></span></h4> 1704<p>An attempt was made to read from a policy manifest, but the manifest 1705initialization has not yet taken place. This is likely a bug in Node.js.</p> 1706<p><a id="ERR_MANIFEST_UNKNOWN_ONERROR"></a></p> 1707<h4><code>ERR_MANIFEST_UNKNOWN_ONERROR</code><span><a class="mark" href="#errors_err_manifest_unknown_onerror" id="errors_err_manifest_unknown_onerror">#</a></span></h4> 1708<p>A policy manifest was loaded, but had an unknown value for its "onerror" 1709behavior. See the documentation for <a href="policy.html">policy</a> manifests for more information.</p> 1710<p><a id="ERR_MEMORY_ALLOCATION_FAILED"></a></p> 1711<h4><code>ERR_MEMORY_ALLOCATION_FAILED</code><span><a class="mark" href="#errors_err_memory_allocation_failed" id="errors_err_memory_allocation_failed">#</a></span></h4> 1712<p>An attempt was made to allocate memory (usually in the C++ layer) but it 1713failed.</p> 1714<p><a id="ERR_MESSAGE_TARGET_CONTEXT_UNAVAILABLE"></a></p> 1715<h4><code>ERR_MESSAGE_TARGET_CONTEXT_UNAVAILABLE</code><span><a class="mark" href="#errors_err_message_target_context_unavailable" id="errors_err_message_target_context_unavailable">#</a></span></h4> 1716<div class="api_metadata"> 1717<span>Added in: v14.5.0</span> 1718</div> 1719<p>A message posted to a <a href="worker_threads.html#worker_threads_class_messageport"><code>MessagePort</code></a> could not be deserialized in the target 1720<a href="vm.html">vm</a> <code>Context</code>. Not all Node.js objects can be successfully instantiated in 1721any context at this time, and attempting to transfer them using <code>postMessage()</code> 1722can fail on the receiving side in that case.</p> 1723<p><a id="ERR_METHOD_NOT_IMPLEMENTED"></a></p> 1724<h4><code>ERR_METHOD_NOT_IMPLEMENTED</code><span><a class="mark" href="#errors_err_method_not_implemented" id="errors_err_method_not_implemented">#</a></span></h4> 1725<p>A method is required but not implemented.</p> 1726<p><a id="ERR_MISSING_ARGS"></a></p> 1727<h4><code>ERR_MISSING_ARGS</code><span><a class="mark" href="#errors_err_missing_args" id="errors_err_missing_args">#</a></span></h4> 1728<p>A required argument of a Node.js API was not passed. This is only used for 1729strict compliance with the API specification (which in some cases may accept 1730<code>func(undefined)</code> but not <code>func()</code>). In most native Node.js APIs, 1731<code>func(undefined)</code> and <code>func()</code> are treated identically, and the 1732<a href="#ERR_INVALID_ARG_TYPE"><code>ERR_INVALID_ARG_TYPE</code></a> error code may be used instead.</p> 1733<p><a id="ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST"></a></p> 1734<h4><code>ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST</code><span><a class="mark" href="#errors_err_missing_message_port_in_transfer_list" id="errors_err_missing_message_port_in_transfer_list">#</a></span></h4> 1735<p>An object that needs to be explicitly listed in the <code>transferList</code> argument 1736is in the object passed to a <code>postMessage()</code> call, but is not provided 1737in the <code>transferList</code> for that call. Usually, this is a <code>MessagePort</code>.</p> 1738<p><a id="ERR_MISSING_OPTION"></a></p> 1739<h4><code>ERR_MISSING_OPTION</code><span><a class="mark" href="#errors_err_missing_option" id="errors_err_missing_option">#</a></span></h4> 1740<p>For APIs that accept options objects, some options might be mandatory. This code 1741is thrown if a required option is missing.</p> 1742<p><a id="ERR_MISSING_PASSPHRASE"></a></p> 1743<h4><code>ERR_MISSING_PASSPHRASE</code><span><a class="mark" href="#errors_err_missing_passphrase" id="errors_err_missing_passphrase">#</a></span></h4> 1744<p>An attempt was made to read an encrypted key without specifying a passphrase.</p> 1745<p><a id="ERR_MISSING_PLATFORM_FOR_WORKER"></a></p> 1746<h4><code>ERR_MISSING_PLATFORM_FOR_WORKER</code><span><a class="mark" href="#errors_err_missing_platform_for_worker" id="errors_err_missing_platform_for_worker">#</a></span></h4> 1747<p>The V8 platform used by this instance of Node.js does not support creating 1748Workers. This is caused by lack of embedder support for Workers. In particular, 1749this error will not occur with standard builds of Node.js.</p> 1750<p><a id="ERR_MODULE_NOT_FOUND"></a></p> 1751<h4><code>ERR_MODULE_NOT_FOUND</code><span><a class="mark" href="#errors_err_module_not_found" id="errors_err_module_not_found">#</a></span></h4> 1752<p></p><div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><p></p> 1753<p>An <a href="esm.html">ES Module</a> could not be resolved.</p> 1754<p><a id="ERR_MULTIPLE_CALLBACK"></a></p> 1755<h4><code>ERR_MULTIPLE_CALLBACK</code><span><a class="mark" href="#errors_err_multiple_callback" id="errors_err_multiple_callback">#</a></span></h4> 1756<p>A callback was called more than once.</p> 1757<p>A callback is almost always meant to only be called once as the query 1758can either be fulfilled or rejected but not both at the same time. The latter 1759would be possible by calling a callback more than once.</p> 1760<p><a id="ERR_NAPI_CONS_FUNCTION"></a></p> 1761<h4><code>ERR_NAPI_CONS_FUNCTION</code><span><a class="mark" href="#errors_err_napi_cons_function" id="errors_err_napi_cons_function">#</a></span></h4> 1762<p>While using <code>Node-API</code>, a constructor passed was not a function.</p> 1763<p><a id="ERR_NAPI_INVALID_DATAVIEW_ARGS"></a></p> 1764<h4><code>ERR_NAPI_INVALID_DATAVIEW_ARGS</code><span><a class="mark" href="#errors_err_napi_invalid_dataview_args" id="errors_err_napi_invalid_dataview_args">#</a></span></h4> 1765<p>While calling <code>napi_create_dataview()</code>, a given <code>offset</code> was outside the bounds 1766of the dataview or <code>offset + length</code> was larger than a length of given <code>buffer</code>.</p> 1767<p><a id="ERR_NAPI_INVALID_TYPEDARRAY_ALIGNMENT"></a></p> 1768<h4><code>ERR_NAPI_INVALID_TYPEDARRAY_ALIGNMENT</code><span><a class="mark" href="#errors_err_napi_invalid_typedarray_alignment" id="errors_err_napi_invalid_typedarray_alignment">#</a></span></h4> 1769<p>While calling <code>napi_create_typedarray()</code>, the provided <code>offset</code> was not a 1770multiple of the element size.</p> 1771<p><a id="ERR_NAPI_INVALID_TYPEDARRAY_LENGTH"></a></p> 1772<h4><code>ERR_NAPI_INVALID_TYPEDARRAY_LENGTH</code><span><a class="mark" href="#errors_err_napi_invalid_typedarray_length" id="errors_err_napi_invalid_typedarray_length">#</a></span></h4> 1773<p>While calling <code>napi_create_typedarray()</code>, <code>(length * size_of_element) + byte_offset</code> was larger than the length of given <code>buffer</code>.</p> 1774<p><a id="ERR_NAPI_TSFN_CALL_JS"></a></p> 1775<h4><code>ERR_NAPI_TSFN_CALL_JS</code><span><a class="mark" href="#errors_err_napi_tsfn_call_js" id="errors_err_napi_tsfn_call_js">#</a></span></h4> 1776<p>An error occurred while invoking the JavaScript portion of the thread-safe 1777function.</p> 1778<p><a id="ERR_NAPI_TSFN_GET_UNDEFINED"></a></p> 1779<h4><code>ERR_NAPI_TSFN_GET_UNDEFINED</code><span><a class="mark" href="#errors_err_napi_tsfn_get_undefined" id="errors_err_napi_tsfn_get_undefined">#</a></span></h4> 1780<p>An error occurred while attempting to retrieve the JavaScript <code>undefined</code> 1781value.</p> 1782<p><a id="ERR_NAPI_TSFN_START_IDLE_LOOP"></a></p> 1783<h4><code>ERR_NAPI_TSFN_START_IDLE_LOOP</code><span><a class="mark" href="#errors_err_napi_tsfn_start_idle_loop" id="errors_err_napi_tsfn_start_idle_loop">#</a></span></h4> 1784<p>On the main thread, values are removed from the queue associated with the 1785thread-safe function in an idle loop. This error indicates that an error 1786has occurred when attempting to start the loop.</p> 1787<p><a id="ERR_NAPI_TSFN_STOP_IDLE_LOOP"></a></p> 1788<h4><code>ERR_NAPI_TSFN_STOP_IDLE_LOOP</code><span><a class="mark" href="#errors_err_napi_tsfn_stop_idle_loop" id="errors_err_napi_tsfn_stop_idle_loop">#</a></span></h4> 1789<p>Once no more items are left in the queue, the idle loop must be suspended. This 1790error indicates that the idle loop has failed to stop.</p> 1791<p><a id="ERR_NO_CRYPTO"></a></p> 1792<h4><code>ERR_NO_CRYPTO</code><span><a class="mark" href="#errors_err_no_crypto" id="errors_err_no_crypto">#</a></span></h4> 1793<p>An attempt was made to use crypto features while Node.js was not compiled with 1794OpenSSL crypto support.</p> 1795<p><a id="ERR_NO_ICU"></a></p> 1796<h4><code>ERR_NO_ICU</code><span><a class="mark" href="#errors_err_no_icu" id="errors_err_no_icu">#</a></span></h4> 1797<p>An attempt was made to use features that require <a href="intl.html#intl_internationalization_support">ICU</a>, but Node.js was not 1798compiled with ICU support.</p> 1799<p><a id="ERR_NON_CONTEXT_AWARE_DISABLED"></a></p> 1800<h4><code>ERR_NON_CONTEXT_AWARE_DISABLED</code><span><a class="mark" href="#errors_err_non_context_aware_disabled" id="errors_err_non_context_aware_disabled">#</a></span></h4> 1801<p>A non-context-aware native addon was loaded in a process that disallows them.</p> 1802<p><a id="ERR_OPERATION_FAILED"></a></p> 1803<h4><code>ERR_OPERATION_FAILED</code><span><a class="mark" href="#errors_err_operation_failed" id="errors_err_operation_failed">#</a></span></h4> 1804<p>An operation failed. This is typically used to signal the general failure of an 1805asynchronous operation.</p> 1806<p><a id="ERR_OUT_OF_RANGE"></a></p> 1807<h4><code>ERR_OUT_OF_RANGE</code><span><a class="mark" href="#errors_err_out_of_range" id="errors_err_out_of_range">#</a></span></h4> 1808<p>A given value is out of the accepted range.</p> 1809<p><a id="ERR_PACKAGE_IMPORT_NOT_DEFINED"></a></p> 1810<h4><code>ERR_PACKAGE_IMPORT_NOT_DEFINED</code><span><a class="mark" href="#errors_err_package_import_not_defined" id="errors_err_package_import_not_defined">#</a></span></h4> 1811<p>The <code>package.json</code> <a href="packages.html#packages_imports"><code>"imports"</code></a> field does not define the given internal 1812package specifier mapping.</p> 1813<p><a id="ERR_PACKAGE_PATH_NOT_EXPORTED"></a></p> 1814<h4><code>ERR_PACKAGE_PATH_NOT_EXPORTED</code><span><a class="mark" href="#errors_err_package_path_not_exported" id="errors_err_package_path_not_exported">#</a></span></h4> 1815<p>The <code>package.json</code> <a href="packages.html#packages_exports"><code>"exports"</code></a> field does not export the requested subpath. 1816Because exports are encapsulated, private internal modules that are not exported 1817cannot be imported through the package resolution, unless using an absolute URL.</p> 1818<p><a id="ERR_PROTO_ACCESS"></a></p> 1819<h4><code>ERR_PROTO_ACCESS</code><span><a class="mark" href="#errors_err_proto_access" id="errors_err_proto_access">#</a></span></h4> 1820<p>Accessing <code>Object.prototype.__proto__</code> has been forbidden using 1821<a href="cli.html#cli_disable_proto_mode"><code>--disable-proto=throw</code></a>. <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getPrototypeOf"><code>Object.getPrototypeOf</code></a> and 1822<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/setPrototypeOf"><code>Object.setPrototypeOf</code></a> should be used to get and set the prototype of an 1823object.</p> 1824<p><a id="ERR_REQUIRE_ESM"></a></p> 1825<h4><code>ERR_REQUIRE_ESM</code><span><a class="mark" href="#errors_err_require_esm" id="errors_err_require_esm">#</a></span></h4> 1826<p></p><div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><p></p> 1827<p>An attempt was made to <code>require()</code> an <a href="esm.html">ES Module</a>.</p> 1828<p><a id="ERR_SCRIPT_EXECUTION_INTERRUPTED"></a></p> 1829<h4><code>ERR_SCRIPT_EXECUTION_INTERRUPTED</code><span><a class="mark" href="#errors_err_script_execution_interrupted" id="errors_err_script_execution_interrupted">#</a></span></h4> 1830<p>Script execution was interrupted by <code>SIGINT</code> (For example, 1831<kbd>Ctrl</kbd>+<kbd>C</kbd> was pressed.)</p> 1832<p><a id="ERR_SCRIPT_EXECUTION_TIMEOUT"></a></p> 1833<h4><code>ERR_SCRIPT_EXECUTION_TIMEOUT</code><span><a class="mark" href="#errors_err_script_execution_timeout" id="errors_err_script_execution_timeout">#</a></span></h4> 1834<p>Script execution timed out, possibly due to bugs in the script being executed.</p> 1835<p><a id="ERR_SERVER_ALREADY_LISTEN"></a></p> 1836<h4><code>ERR_SERVER_ALREADY_LISTEN</code><span><a class="mark" href="#errors_err_server_already_listen" id="errors_err_server_already_listen">#</a></span></h4> 1837<p>The <a href="net.html#net_server_listen"><code>server.listen()</code></a> method was called while a <code>net.Server</code> was already 1838listening. This applies to all instances of <code>net.Server</code>, including HTTP, HTTPS, 1839and HTTP/2 <code>Server</code> instances.</p> 1840<p><a id="ERR_SERVER_NOT_RUNNING"></a></p> 1841<h4><code>ERR_SERVER_NOT_RUNNING</code><span><a class="mark" href="#errors_err_server_not_running" id="errors_err_server_not_running">#</a></span></h4> 1842<p>The <a href="net.html#net_server_close_callback"><code>server.close()</code></a> method was called when a <code>net.Server</code> was not 1843running. This applies to all instances of <code>net.Server</code>, including HTTP, HTTPS, 1844and HTTP/2 <code>Server</code> instances.</p> 1845<p><a id="ERR_SOCKET_ALREADY_BOUND"></a></p> 1846<h4><code>ERR_SOCKET_ALREADY_BOUND</code><span><a class="mark" href="#errors_err_socket_already_bound" id="errors_err_socket_already_bound">#</a></span></h4> 1847<p>An attempt was made to bind a socket that has already been bound.</p> 1848<p><a id="ERR_SOCKET_BAD_BUFFER_SIZE"></a></p> 1849<h4><code>ERR_SOCKET_BAD_BUFFER_SIZE</code><span><a class="mark" href="#errors_err_socket_bad_buffer_size" id="errors_err_socket_bad_buffer_size">#</a></span></h4> 1850<p>An invalid (negative) size was passed for either the <code>recvBufferSize</code> or 1851<code>sendBufferSize</code> options in <a href="dgram.html#dgram_dgram_createsocket_options_callback"><code>dgram.createSocket()</code></a>.</p> 1852<p><a id="ERR_SOCKET_BAD_PORT"></a></p> 1853<h4><code>ERR_SOCKET_BAD_PORT</code><span><a class="mark" href="#errors_err_socket_bad_port" id="errors_err_socket_bad_port">#</a></span></h4> 1854<p>An API function expecting a port >= 0 and < 65536 received an invalid value.</p> 1855<p><a id="ERR_SOCKET_BAD_TYPE"></a></p> 1856<h4><code>ERR_SOCKET_BAD_TYPE</code><span><a class="mark" href="#errors_err_socket_bad_type" id="errors_err_socket_bad_type">#</a></span></h4> 1857<p>An API function expecting a socket type (<code>udp4</code> or <code>udp6</code>) received an invalid 1858value.</p> 1859<p><a id="ERR_SOCKET_BUFFER_SIZE"></a></p> 1860<h4><code>ERR_SOCKET_BUFFER_SIZE</code><span><a class="mark" href="#errors_err_socket_buffer_size" id="errors_err_socket_buffer_size">#</a></span></h4> 1861<p>While using <a href="dgram.html#dgram_dgram_createsocket_options_callback"><code>dgram.createSocket()</code></a>, the size of the receive or send <code>Buffer</code> 1862could not be determined.</p> 1863<p><a id="ERR_SOCKET_CLOSED"></a></p> 1864<h4><code>ERR_SOCKET_CLOSED</code><span><a class="mark" href="#errors_err_socket_closed" id="errors_err_socket_closed">#</a></span></h4> 1865<p>An attempt was made to operate on an already closed socket.</p> 1866<p><a id="ERR_SOCKET_DGRAM_IS_CONNECTED"></a></p> 1867<h4><code>ERR_SOCKET_DGRAM_IS_CONNECTED</code><span><a class="mark" href="#errors_err_socket_dgram_is_connected" id="errors_err_socket_dgram_is_connected">#</a></span></h4> 1868<p>A <a href="dgram.html#dgram_socket_connect_port_address_callback"><code>dgram.connect()</code></a> call was made on an already connected socket.</p> 1869<p><a id="ERR_SOCKET_DGRAM_NOT_CONNECTED"></a></p> 1870<h4><code>ERR_SOCKET_DGRAM_NOT_CONNECTED</code><span><a class="mark" href="#errors_err_socket_dgram_not_connected" id="errors_err_socket_dgram_not_connected">#</a></span></h4> 1871<p>A <a href="dgram.html#dgram_socket_disconnect"><code>dgram.disconnect()</code></a> or <a href="dgram.html#dgram_socket_remoteaddress"><code>dgram.remoteAddress()</code></a> call was made on a 1872disconnected socket.</p> 1873<p><a id="ERR_SOCKET_DGRAM_NOT_RUNNING"></a></p> 1874<h4><code>ERR_SOCKET_DGRAM_NOT_RUNNING</code><span><a class="mark" href="#errors_err_socket_dgram_not_running" id="errors_err_socket_dgram_not_running">#</a></span></h4> 1875<p>A call was made and the UDP subsystem was not running.</p> 1876<p><a id="ERR_SRI_PARSE"></a></p> 1877<h4><code>ERR_SRI_PARSE</code><span><a class="mark" href="#errors_err_sri_parse" id="errors_err_sri_parse">#</a></span></h4> 1878<p>A string was provided for a Subresource Integrity check, but was unable to be 1879parsed. Check the format of integrity attributes by looking at the 1880<a href="https://www.w3.org/TR/SRI/#the-integrity-attribute">Subresource Integrity specification</a>.</p> 1881<p><a id="ERR_STREAM_ALREADY_FINISHED"></a></p> 1882<h4><code>ERR_STREAM_ALREADY_FINISHED</code><span><a class="mark" href="#errors_err_stream_already_finished" id="errors_err_stream_already_finished">#</a></span></h4> 1883<p>A stream method was called that cannot complete because the stream was 1884finished.</p> 1885<p><a id="ERR_STREAM_CANNOT_PIPE"></a></p> 1886<h4><code>ERR_STREAM_CANNOT_PIPE</code><span><a class="mark" href="#errors_err_stream_cannot_pipe" id="errors_err_stream_cannot_pipe">#</a></span></h4> 1887<p>An attempt was made to call <a href="stream.html#stream_readable_pipe_destination_options"><code>stream.pipe()</code></a> on a <a href="stream.html#stream_class_stream_writable"><code>Writable</code></a> stream.</p> 1888<p><a id="ERR_STREAM_DESTROYED"></a></p> 1889<h4><code>ERR_STREAM_DESTROYED</code><span><a class="mark" href="#errors_err_stream_destroyed" id="errors_err_stream_destroyed">#</a></span></h4> 1890<p>A stream method was called that cannot complete because the stream was 1891destroyed using <code>stream.destroy()</code>.</p> 1892<p><a id="ERR_STREAM_NULL_VALUES"></a></p> 1893<h4><code>ERR_STREAM_NULL_VALUES</code><span><a class="mark" href="#errors_err_stream_null_values" id="errors_err_stream_null_values">#</a></span></h4> 1894<p>An attempt was made to call <a href="stream.html#stream_writable_write_chunk_encoding_callback"><code>stream.write()</code></a> with a <code>null</code> chunk.</p> 1895<p><a id="ERR_STREAM_PREMATURE_CLOSE"></a></p> 1896<h4><code>ERR_STREAM_PREMATURE_CLOSE</code><span><a class="mark" href="#errors_err_stream_premature_close" id="errors_err_stream_premature_close">#</a></span></h4> 1897<p>An error returned by <code>stream.finished()</code> and <code>stream.pipeline()</code>, when a stream 1898or a pipeline ends non gracefully with no explicit error.</p> 1899<p><a id="ERR_STREAM_PUSH_AFTER_EOF"></a></p> 1900<h4><code>ERR_STREAM_PUSH_AFTER_EOF</code><span><a class="mark" href="#errors_err_stream_push_after_eof" id="errors_err_stream_push_after_eof">#</a></span></h4> 1901<p>An attempt was made to call <a href="stream.html#stream_readable_push_chunk_encoding"><code>stream.push()</code></a> after a <code>null</code>(EOF) had been 1902pushed to the stream.</p> 1903<p><a id="ERR_STREAM_UNSHIFT_AFTER_END_EVENT"></a></p> 1904<h4><code>ERR_STREAM_UNSHIFT_AFTER_END_EVENT</code><span><a class="mark" href="#errors_err_stream_unshift_after_end_event" id="errors_err_stream_unshift_after_end_event">#</a></span></h4> 1905<p>An attempt was made to call <a href="stream.html#stream_readable_unshift_chunk_encoding"><code>stream.unshift()</code></a> after the <code>'end'</code> event was 1906emitted.</p> 1907<p><a id="ERR_STREAM_WRAP"></a></p> 1908<h4><code>ERR_STREAM_WRAP</code><span><a class="mark" href="#errors_err_stream_wrap" id="errors_err_stream_wrap">#</a></span></h4> 1909<p>Prevents an abort if a string decoder was set on the Socket or if the decoder 1910is in <code>objectMode</code>.</p> 1911<pre><code class="language-js"><span class="hljs-keyword">const</span> <span class="hljs-title class_">Socket</span> = <span class="hljs-built_in">require</span>(<span class="hljs-string">'net'</span>).<span class="hljs-property">Socket</span>; 1912<span class="hljs-keyword">const</span> instance = <span class="hljs-keyword">new</span> <span class="hljs-title class_">Socket</span>(); 1913 1914instance.<span class="hljs-title function_">setEncoding</span>(<span class="hljs-string">'utf8'</span>);</code></pre> 1915<p><a id="ERR_STREAM_WRITE_AFTER_END"></a></p> 1916<h4><code>ERR_STREAM_WRITE_AFTER_END</code><span><a class="mark" href="#errors_err_stream_write_after_end" id="errors_err_stream_write_after_end">#</a></span></h4> 1917<p>An attempt was made to call <a href="stream.html#stream_writable_write_chunk_encoding_callback"><code>stream.write()</code></a> after <code>stream.end()</code> has been 1918called.</p> 1919<p><a id="ERR_STRING_TOO_LONG"></a></p> 1920<h4><code>ERR_STRING_TOO_LONG</code><span><a class="mark" href="#errors_err_string_too_long" id="errors_err_string_too_long">#</a></span></h4> 1921<p>An attempt has been made to create a string longer than the maximum allowed 1922length.</p> 1923<p><a id="ERR_SYNTHETIC"></a></p> 1924<h4><code>ERR_SYNTHETIC</code><span><a class="mark" href="#errors_err_synthetic" id="errors_err_synthetic">#</a></span></h4> 1925<p>An artificial error object used to capture the call stack for diagnostic 1926reports.</p> 1927<p><a id="ERR_SYSTEM_ERROR"></a></p> 1928<h4><code>ERR_SYSTEM_ERROR</code><span><a class="mark" href="#errors_err_system_error" id="errors_err_system_error">#</a></span></h4> 1929<p>An unspecified or non-specific system error has occurred within the Node.js 1930process. The error object will have an <code>err.info</code> object property with 1931additional details.</p> 1932<p><a id="ERR_TLS_CERT_ALTNAME_FORMAT"></a></p> 1933<h4><code>ERR_TLS_CERT_ALTNAME_FORMAT</code><span><a class="mark" href="#errors_err_tls_cert_altname_format" id="errors_err_tls_cert_altname_format">#</a></span></h4> 1934<p>This error is thrown by <code>checkServerIdentity</code> if a user-supplied 1935<code>subjectaltname</code> property violates encoding rules. Certificate objects produced 1936by Node.js itself always comply with encoding rules and will never cause 1937this error.</p> 1938<p><a id="ERR_TLS_CERT_ALTNAME_INVALID"></a></p> 1939<h4><code>ERR_TLS_CERT_ALTNAME_INVALID</code><span><a class="mark" href="#errors_err_tls_cert_altname_invalid" id="errors_err_tls_cert_altname_invalid">#</a></span></h4> 1940<p>While using TLS, the host name/IP of the peer did not match any of the 1941<code>subjectAltNames</code> in its certificate.</p> 1942<p><a id="ERR_TLS_DH_PARAM_SIZE"></a></p> 1943<h4><code>ERR_TLS_DH_PARAM_SIZE</code><span><a class="mark" href="#errors_err_tls_dh_param_size" id="errors_err_tls_dh_param_size">#</a></span></h4> 1944<p>While using TLS, the parameter offered for the Diffie-Hellman (<code>DH</code>) 1945key-agreement protocol is too small. By default, the key length must be greater 1946than or equal to 1024 bits to avoid vulnerabilities, even though it is strongly 1947recommended to use 2048 bits or larger for stronger security.</p> 1948<p><a id="ERR_TLS_HANDSHAKE_TIMEOUT"></a></p> 1949<h4><code>ERR_TLS_HANDSHAKE_TIMEOUT</code><span><a class="mark" href="#errors_err_tls_handshake_timeout" id="errors_err_tls_handshake_timeout">#</a></span></h4> 1950<p>A TLS/SSL handshake timed out. In this case, the server must also abort the 1951connection.</p> 1952<p><a id="ERR_TLS_INVALID_CONTEXT"></a></p> 1953<h4><code>ERR_TLS_INVALID_CONTEXT</code><span><a class="mark" href="#errors_err_tls_invalid_context" id="errors_err_tls_invalid_context">#</a></span></h4> 1954<div class="api_metadata"> 1955<span>Added in: v13.3.0</span> 1956</div> 1957<p>The context must be a <code>SecureContext</code>.</p> 1958<p><a id="ERR_TLS_INVALID_PROTOCOL_METHOD"></a></p> 1959<h4><code>ERR_TLS_INVALID_PROTOCOL_METHOD</code><span><a class="mark" href="#errors_err_tls_invalid_protocol_method" id="errors_err_tls_invalid_protocol_method">#</a></span></h4> 1960<p>The specified <code>secureProtocol</code> method is invalid. It is either unknown, or 1961disabled because it is insecure.</p> 1962<p><a id="ERR_TLS_INVALID_PROTOCOL_VERSION"></a></p> 1963<h4><code>ERR_TLS_INVALID_PROTOCOL_VERSION</code><span><a class="mark" href="#errors_err_tls_invalid_protocol_version" id="errors_err_tls_invalid_protocol_version">#</a></span></h4> 1964<p>Valid TLS protocol versions are <code>'TLSv1'</code>, <code>'TLSv1.1'</code>, or <code>'TLSv1.2'</code>.</p> 1965<p><a id="ERR_TLS_INVALID_STATE"></a></p> 1966<h4><code>ERR_TLS_INVALID_STATE</code><span><a class="mark" href="#errors_err_tls_invalid_state" id="errors_err_tls_invalid_state">#</a></span></h4> 1967<div class="api_metadata"> 1968<span>Added in: v13.10.0, v12.17.0</span> 1969</div> 1970<p>The TLS socket must be connected and securily established. Ensure the 'secure' 1971event is emitted before continuing.</p> 1972<p><a id="ERR_TLS_PROTOCOL_VERSION_CONFLICT"></a></p> 1973<h4><code>ERR_TLS_PROTOCOL_VERSION_CONFLICT</code><span><a class="mark" href="#errors_err_tls_protocol_version_conflict" id="errors_err_tls_protocol_version_conflict">#</a></span></h4> 1974<p>Attempting to set a TLS protocol <code>minVersion</code> or <code>maxVersion</code> conflicts with an 1975attempt to set the <code>secureProtocol</code> explicitly. Use one mechanism or the other.</p> 1976<p><a id="ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED"></a></p> 1977<h4><code>ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED</code><span><a class="mark" href="#errors_err_tls_psk_set_identiy_hint_failed" id="errors_err_tls_psk_set_identiy_hint_failed">#</a></span></h4> 1978<p>Failed to set PSK identity hint. Hint may be too long.</p> 1979<p><a id="ERR_TLS_RENEGOTIATION_DISABLED"></a></p> 1980<h4><code>ERR_TLS_RENEGOTIATION_DISABLED</code><span><a class="mark" href="#errors_err_tls_renegotiation_disabled" id="errors_err_tls_renegotiation_disabled">#</a></span></h4> 1981<p>An attempt was made to renegotiate TLS on a socket instance with TLS disabled.</p> 1982<p><a id="ERR_TLS_REQUIRED_SERVER_NAME"></a></p> 1983<h4><code>ERR_TLS_REQUIRED_SERVER_NAME</code><span><a class="mark" href="#errors_err_tls_required_server_name" id="errors_err_tls_required_server_name">#</a></span></h4> 1984<p>While using TLS, the <code>server.addContext()</code> method was called without providing 1985a host name in the first parameter.</p> 1986<p><a id="ERR_TLS_SESSION_ATTACK"></a></p> 1987<h4><code>ERR_TLS_SESSION_ATTACK</code><span><a class="mark" href="#errors_err_tls_session_attack" id="errors_err_tls_session_attack">#</a></span></h4> 1988<p>An excessive amount of TLS renegotiations is detected, which is a potential 1989vector for denial-of-service attacks.</p> 1990<p><a id="ERR_TLS_SNI_FROM_SERVER"></a></p> 1991<h4><code>ERR_TLS_SNI_FROM_SERVER</code><span><a class="mark" href="#errors_err_tls_sni_from_server" id="errors_err_tls_sni_from_server">#</a></span></h4> 1992<p>An attempt was made to issue Server Name Indication from a TLS server-side 1993socket, which is only valid from a client.</p> 1994<p><a id="ERR_TRACE_EVENTS_CATEGORY_REQUIRED"></a></p> 1995<h4><code>ERR_TRACE_EVENTS_CATEGORY_REQUIRED</code><span><a class="mark" href="#errors_err_trace_events_category_required" id="errors_err_trace_events_category_required">#</a></span></h4> 1996<p>The <code>trace_events.createTracing()</code> method requires at least one trace event 1997category.</p> 1998<p><a id="ERR_TRACE_EVENTS_UNAVAILABLE"></a></p> 1999<h4><code>ERR_TRACE_EVENTS_UNAVAILABLE</code><span><a class="mark" href="#errors_err_trace_events_unavailable" id="errors_err_trace_events_unavailable">#</a></span></h4> 2000<p>The <code>trace_events</code> module could not be loaded because Node.js was compiled with 2001the <code>--without-v8-platform</code> flag.</p> 2002<p><a id="ERR_TRANSFORM_ALREADY_TRANSFORMING"></a></p> 2003<h4><code>ERR_TRANSFORM_ALREADY_TRANSFORMING</code><span><a class="mark" href="#errors_err_transform_already_transforming" id="errors_err_transform_already_transforming">#</a></span></h4> 2004<p>A <code>Transform</code> stream finished while it was still transforming.</p> 2005<p><a id="ERR_TRANSFORM_WITH_LENGTH_0"></a></p> 2006<h4><code>ERR_TRANSFORM_WITH_LENGTH_0</code><span><a class="mark" href="#errors_err_transform_with_length_0" id="errors_err_transform_with_length_0">#</a></span></h4> 2007<p>A <code>Transform</code> stream finished with data still in the write buffer.</p> 2008<p><a id="ERR_TTY_INIT_FAILED"></a></p> 2009<h4><code>ERR_TTY_INIT_FAILED</code><span><a class="mark" href="#errors_err_tty_init_failed" id="errors_err_tty_init_failed">#</a></span></h4> 2010<p>The initialization of a TTY failed due to a system error.</p> 2011<p><a id="ERR_UNAVAILABLE_DURING_EXIT"></a></p> 2012<h4><code>ERR_UNAVAILABLE_DURING_EXIT</code><span><a class="mark" href="#errors_err_unavailable_during_exit" id="errors_err_unavailable_during_exit">#</a></span></h4> 2013<p>Function was called within a <a href="process.html#process_event_exit"><code>process.on('exit')</code></a> handler that shouldn't be 2014called within <a href="process.html#process_event_exit"><code>process.on('exit')</code></a> handler.</p> 2015<p><a id="ERR_UNCAUGHT_EXCEPTION_CAPTURE_ALREADY_SET"></a></p> 2016<h4><code>ERR_UNCAUGHT_EXCEPTION_CAPTURE_ALREADY_SET</code><span><a class="mark" href="#errors_err_uncaught_exception_capture_already_set" id="errors_err_uncaught_exception_capture_already_set">#</a></span></h4> 2017<p><a href="process.html#process_process_setuncaughtexceptioncapturecallback_fn"><code>process.setUncaughtExceptionCaptureCallback()</code></a> was called twice, 2018without first resetting the callback to <code>null</code>.</p> 2019<p>This error is designed to prevent accidentally overwriting a callback registered 2020from another module.</p> 2021<p><a id="ERR_UNESCAPED_CHARACTERS"></a></p> 2022<h4><code>ERR_UNESCAPED_CHARACTERS</code><span><a class="mark" href="#errors_err_unescaped_characters" id="errors_err_unescaped_characters">#</a></span></h4> 2023<p>A string that contained unescaped characters was received.</p> 2024<p><a id="ERR_UNHANDLED_ERROR"></a></p> 2025<h4><code>ERR_UNHANDLED_ERROR</code><span><a class="mark" href="#errors_err_unhandled_error" id="errors_err_unhandled_error">#</a></span></h4> 2026<p>An unhandled error occurred (for instance, when an <code>'error'</code> event is emitted 2027by an <a href="events.html#events_class_eventemitter"><code>EventEmitter</code></a> but an <code>'error'</code> handler is not registered).</p> 2028<p><a id="ERR_UNKNOWN_BUILTIN_MODULE"></a></p> 2029<h4><code>ERR_UNKNOWN_BUILTIN_MODULE</code><span><a class="mark" href="#errors_err_unknown_builtin_module" id="errors_err_unknown_builtin_module">#</a></span></h4> 2030<p>Used to identify a specific kind of internal Node.js error that should not 2031typically be triggered by user code. Instances of this error point to an 2032internal bug within the Node.js binary itself.</p> 2033<p><a id="ERR_UNKNOWN_CREDENTIAL"></a></p> 2034<h4><code>ERR_UNKNOWN_CREDENTIAL</code><span><a class="mark" href="#errors_err_unknown_credential" id="errors_err_unknown_credential">#</a></span></h4> 2035<p>A Unix group or user identifier that does not exist was passed.</p> 2036<p><a id="ERR_UNKNOWN_ENCODING"></a></p> 2037<h4><code>ERR_UNKNOWN_ENCODING</code><span><a class="mark" href="#errors_err_unknown_encoding" id="errors_err_unknown_encoding">#</a></span></h4> 2038<p>An invalid or unknown encoding option was passed to an API.</p> 2039<p><a id="ERR_UNKNOWN_FILE_EXTENSION"></a></p> 2040<h4><code>ERR_UNKNOWN_FILE_EXTENSION</code><span><a class="mark" href="#errors_err_unknown_file_extension" id="errors_err_unknown_file_extension">#</a></span></h4> 2041<p></p><div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><p></p> 2042<p>An attempt was made to load a module with an unknown or unsupported file 2043extension.</p> 2044<p><a id="ERR_UNKNOWN_MODULE_FORMAT"></a></p> 2045<h4><code>ERR_UNKNOWN_MODULE_FORMAT</code><span><a class="mark" href="#errors_err_unknown_module_format" id="errors_err_unknown_module_format">#</a></span></h4> 2046<p></p><div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><p></p> 2047<p>An attempt was made to load a module with an unknown or unsupported format.</p> 2048<p><a id="ERR_UNKNOWN_SIGNAL"></a></p> 2049<h4><code>ERR_UNKNOWN_SIGNAL</code><span><a class="mark" href="#errors_err_unknown_signal" id="errors_err_unknown_signal">#</a></span></h4> 2050<p>An invalid or unknown process signal was passed to an API expecting a valid 2051signal (such as <a href="child_process.html#child_process_subprocess_kill_signal"><code>subprocess.kill()</code></a>).</p> 2052<p><a id="ERR_UNSUPPORTED_DIR_IMPORT"></a></p> 2053<h4><code>ERR_UNSUPPORTED_DIR_IMPORT</code><span><a class="mark" href="#errors_err_unsupported_dir_import" id="errors_err_unsupported_dir_import">#</a></span></h4> 2054<p><code>import</code> a directory URL is unsupported. Instead, 2055<a href="packages.html#packages_self_referencing_a_package_using_its_name">self-reference a package using its name</a> and <a href="packages.html#packages_subpath_exports">define a custom subpath</a> in 2056the <a href="packages.html#packages_exports"><code>"exports"</code></a> field of the <a href="packages.html#packages_node_js_package_json_field_definitions"><code>package.json</code></a> file.</p> 2057<!-- eslint-skip --> 2058<pre><code class="language-js"><span class="hljs-keyword">import</span> <span class="hljs-string">'./'</span>; <span class="hljs-comment">// unsupported</span> 2059<span class="hljs-keyword">import</span> <span class="hljs-string">'./index.js'</span>; <span class="hljs-comment">// supported</span> 2060<span class="hljs-keyword">import</span> <span class="hljs-string">'package-name'</span>; <span class="hljs-comment">// supported</span></code></pre> 2061<p><a id="ERR_UNSUPPORTED_ESM_URL_SCHEME"></a></p> 2062<h4><code>ERR_UNSUPPORTED_ESM_URL_SCHEME</code><span><a class="mark" href="#errors_err_unsupported_esm_url_scheme" id="errors_err_unsupported_esm_url_scheme">#</a></span></h4> 2063<p><code>import</code> with URL schemes other than <code>file</code> and <code>data</code> is unsupported.</p> 2064<p><a id="ERR_VALID_PERFORMANCE_ENTRY_TYPE"></a></p> 2065<h4><code>ERR_VALID_PERFORMANCE_ENTRY_TYPE</code><span><a class="mark" href="#errors_err_valid_performance_entry_type" id="errors_err_valid_performance_entry_type">#</a></span></h4> 2066<p>While using the Performance Timing API (<code>perf_hooks</code>), no valid performance 2067entry types are found.</p> 2068<p><a id="ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING"></a></p> 2069<h4><code>ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING</code><span><a class="mark" href="#errors_err_vm_dynamic_import_callback_missing" id="errors_err_vm_dynamic_import_callback_missing">#</a></span></h4> 2070<p>A dynamic import callback was not specified.</p> 2071<p><a id="ERR_VM_MODULE_ALREADY_LINKED"></a></p> 2072<h4><code>ERR_VM_MODULE_ALREADY_LINKED</code><span><a class="mark" href="#errors_err_vm_module_already_linked" id="errors_err_vm_module_already_linked">#</a></span></h4> 2073<p>The module attempted to be linked is not eligible for linking, because of one of 2074the following reasons:</p> 2075<ul> 2076<li>It has already been linked (<code>linkingStatus</code> is <code>'linked'</code>)</li> 2077<li>It is being linked (<code>linkingStatus</code> is <code>'linking'</code>)</li> 2078<li>Linking has failed for this module (<code>linkingStatus</code> is <code>'errored'</code>)</li> 2079</ul> 2080<p><a id="ERR_VM_MODULE_CACHED_DATA_REJECTED"></a></p> 2081<h4><code>ERR_VM_MODULE_CACHED_DATA_REJECTED</code><span><a class="mark" href="#errors_err_vm_module_cached_data_rejected" id="errors_err_vm_module_cached_data_rejected">#</a></span></h4> 2082<p>The <code>cachedData</code> option passed to a module constructor is invalid.</p> 2083<p><a id="ERR_VM_MODULE_CANNOT_CREATE_CACHED_DATA"></a></p> 2084<h4><code>ERR_VM_MODULE_CANNOT_CREATE_CACHED_DATA</code><span><a class="mark" href="#errors_err_vm_module_cannot_create_cached_data" id="errors_err_vm_module_cannot_create_cached_data">#</a></span></h4> 2085<p>Cached data cannot be created for modules which have already been evaluated.</p> 2086<p><a id="ERR_VM_MODULE_DIFFERENT_CONTEXT"></a></p> 2087<h4><code>ERR_VM_MODULE_DIFFERENT_CONTEXT</code><span><a class="mark" href="#errors_err_vm_module_different_context" id="errors_err_vm_module_different_context">#</a></span></h4> 2088<p>The module being returned from the linker function is from a different context 2089than the parent module. Linked modules must share the same context.</p> 2090<p><a id="ERR_VM_MODULE_LINKING_ERRORED"></a></p> 2091<h4><code>ERR_VM_MODULE_LINKING_ERRORED</code><span><a class="mark" href="#errors_err_vm_module_linking_errored" id="errors_err_vm_module_linking_errored">#</a></span></h4> 2092<p>The linker function returned a module for which linking has failed.</p> 2093<p><a id="ERR_VM_MODULE_LINK_FAILURE"></a></p> 2094<h4><code>ERR_VM_MODULE_LINK_FAILURE</code><span><a class="mark" href="#errors_err_vm_module_link_failure" id="errors_err_vm_module_link_failure">#</a></span></h4> 2095<p>The module was unable to be linked due to a failure.</p> 2096<p><a id="ERR_VM_MODULE_NOT_MODULE"></a></p> 2097<h4><code>ERR_VM_MODULE_NOT_MODULE</code><span><a class="mark" href="#errors_err_vm_module_not_module" id="errors_err_vm_module_not_module">#</a></span></h4> 2098<p>The fulfilled value of a linking promise is not a <code>vm.Module</code> object.</p> 2099<p><a id="ERR_VM_MODULE_STATUS"></a></p> 2100<h4><code>ERR_VM_MODULE_STATUS</code><span><a class="mark" href="#errors_err_vm_module_status" id="errors_err_vm_module_status">#</a></span></h4> 2101<p>The current module's status does not allow for this operation. The specific 2102meaning of the error depends on the specific function.</p> 2103<p><a id="ERR_WASI_ALREADY_STARTED"></a></p> 2104<h4><code>ERR_WASI_ALREADY_STARTED</code><span><a class="mark" href="#errors_err_wasi_already_started" id="errors_err_wasi_already_started">#</a></span></h4> 2105<p>The WASI instance has already started.</p> 2106<p><a id="ERR_WASI_NOT_STARTED"></a></p> 2107<h4><code>ERR_WASI_NOT_STARTED</code><span><a class="mark" href="#errors_err_wasi_not_started" id="errors_err_wasi_not_started">#</a></span></h4> 2108<p>The WASI instance has not been started.</p> 2109<p><a id="ERR_WORKER_INIT_FAILED"></a></p> 2110<h4><code>ERR_WORKER_INIT_FAILED</code><span><a class="mark" href="#errors_err_worker_init_failed" id="errors_err_worker_init_failed">#</a></span></h4> 2111<p>The <code>Worker</code> initialization failed.</p> 2112<p><a id="ERR_WORKER_INVALID_EXEC_ARGV"></a></p> 2113<h4><code>ERR_WORKER_INVALID_EXEC_ARGV</code><span><a class="mark" href="#errors_err_worker_invalid_exec_argv" id="errors_err_worker_invalid_exec_argv">#</a></span></h4> 2114<p>The <code>execArgv</code> option passed to the <code>Worker</code> constructor contains 2115invalid flags.</p> 2116<p><a id="ERR_WORKER_NOT_RUNNING"></a></p> 2117<h4><code>ERR_WORKER_NOT_RUNNING</code><span><a class="mark" href="#errors_err_worker_not_running" id="errors_err_worker_not_running">#</a></span></h4> 2118<p>An operation failed because the <code>Worker</code> instance is not currently running.</p> 2119<p><a id="ERR_WORKER_OUT_OF_MEMORY"></a></p> 2120<h4><code>ERR_WORKER_OUT_OF_MEMORY</code><span><a class="mark" href="#errors_err_worker_out_of_memory" id="errors_err_worker_out_of_memory">#</a></span></h4> 2121<p>The <code>Worker</code> instance terminated because it reached its memory limit.</p> 2122<p><a id="ERR_WORKER_PATH"></a></p> 2123<h4><code>ERR_WORKER_PATH</code><span><a class="mark" href="#errors_err_worker_path" id="errors_err_worker_path">#</a></span></h4> 2124<p>The path for the main script of a worker is neither an absolute path 2125nor a relative path starting with <code>./</code> or <code>../</code>.</p> 2126<p><a id="ERR_WORKER_UNSERIALIZABLE_ERROR"></a></p> 2127<h4><code>ERR_WORKER_UNSERIALIZABLE_ERROR</code><span><a class="mark" href="#errors_err_worker_unserializable_error" id="errors_err_worker_unserializable_error">#</a></span></h4> 2128<p>All attempts at serializing an uncaught exception from a worker thread failed.</p> 2129<p><a id="ERR_WORKER_UNSUPPORTED_EXTENSION"></a></p> 2130<h4><code>ERR_WORKER_UNSUPPORTED_EXTENSION</code><span><a class="mark" href="#errors_err_worker_unsupported_extension" id="errors_err_worker_unsupported_extension">#</a></span></h4> 2131<p>The pathname used for the main script of a worker has an 2132unknown file extension.</p> 2133<p><a id="ERR_WORKER_UNSUPPORTED_OPERATION"></a></p> 2134<h4><code>ERR_WORKER_UNSUPPORTED_OPERATION</code><span><a class="mark" href="#errors_err_worker_unsupported_operation" id="errors_err_worker_unsupported_operation">#</a></span></h4> 2135<p>The requested functionality is not supported in worker threads.</p> 2136<p><a id="ERR_ZLIB_INITIALIZATION_FAILED"></a></p> 2137<h4><code>ERR_ZLIB_INITIALIZATION_FAILED</code><span><a class="mark" href="#errors_err_zlib_initialization_failed" id="errors_err_zlib_initialization_failed">#</a></span></h4> 2138<p>Creation of a <a href="zlib.html"><code>zlib</code></a> object failed due to incorrect configuration.</p> 2139<p><a id="HPE_HEADER_OVERFLOW"></a></p> 2140<h4><code>HPE_HEADER_OVERFLOW</code><span><a class="mark" href="#errors_hpe_header_overflow" id="errors_hpe_header_overflow">#</a></span></h4> 2141<div class="api_metadata"> 2142<details class="changelog"><summary>History</summary> 2143<table> 2144<tbody><tr><th>Version</th><th>Changes</th></tr> 2145<tr><td>v11.4.0, v10.15.0</td> 2146<td><p>Max header size in <code>http_parser</code> was set to 8KB.</p></td></tr> 2147</tbody></table> 2148</details> 2149</div> 2150<p>Too much HTTP header data was received. In order to protect against malicious or 2151malconfigured clients, if more than 8KB of HTTP header data is received then 2152HTTP parsing will abort without a request or response object being created, and 2153an <code>Error</code> with this code will be emitted.</p> 2154<p><a id="HPE_UNEXPECTED_CONTENT_LENGTH"></a></p> 2155<h4><code>HPE_UNEXPECTED_CONTENT_LENGTH</code><span><a class="mark" href="#errors_hpe_unexpected_content_length" id="errors_hpe_unexpected_content_length">#</a></span></h4> 2156<p>Server is sending both a <code>Content-Length</code> header and <code>Transfer-Encoding: chunked</code>.</p> 2157<p><code>Transfer-Encoding: chunked</code> allows the server to maintain an HTTP persistent 2158connection for dynamically generated content. 2159In this case, the <code>Content-Length</code> HTTP header cannot be used.</p> 2160<p>Use <code>Content-Length</code> or <code>Transfer-Encoding: chunked</code>.</p> 2161<p><a id="MODULE_NOT_FOUND"></a></p> 2162<h4><code>MODULE_NOT_FOUND</code><span><a class="mark" href="#errors_module_not_found" id="errors_module_not_found">#</a></span></h4> 2163<div class="api_metadata"> 2164<details class="changelog"><summary>History</summary> 2165<table> 2166<tbody><tr><th>Version</th><th>Changes</th></tr> 2167<tr><td>v12.0.0</td> 2168<td><p>Added <code>requireStack</code> property.</p></td></tr> 2169</tbody></table> 2170</details> 2171</div> 2172<p>A module file could not be resolved while attempting a <a href="modules.html#modules_require_id"><code>require()</code></a> or 2173<code>import</code> operation.</p> 2174</section><section><h3>Legacy Node.js error codes<span><a class="mark" href="#errors_legacy_node_js_error_codes" id="errors_legacy_node_js_error_codes">#</a></span></h3> 2175<p></p><div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated. These error codes are either inconsistent, or have 2176been removed.</div><p></p> 2177<p><a id="ERR_CANNOT_TRANSFER_OBJECT"></a></p> 2178<h4><code>ERR_CANNOT_TRANSFER_OBJECT</code><span><a class="mark" href="#errors_err_cannot_transfer_object" id="errors_err_cannot_transfer_object">#</a></span></h4> 2179<!-- 2180added: v10.5.0 2181removed: v12.5.0 2182--> 2183<p>The value passed to <code>postMessage()</code> contained an object that is not supported 2184for transferring.</p> 2185<p><a id="ERR_CRYPTO_HASH_DIGEST_NO_UTF16"></a></p> 2186<h4><code>ERR_CRYPTO_HASH_DIGEST_NO_UTF16</code><span><a class="mark" href="#errors_err_crypto_hash_digest_no_utf16" id="errors_err_crypto_hash_digest_no_utf16">#</a></span></h4> 2187<div class="api_metadata"> 2188<span>Added in: v9.0.0</span><span>Removed in: v12.12.0</span> 2189</div> 2190<p>The UTF-16 encoding was used with <a href="crypto.html#crypto_hash_digest_encoding"><code>hash.digest()</code></a>. While the 2191<code>hash.digest()</code> method does allow an <code>encoding</code> argument to be passed in, 2192causing the method to return a string rather than a <code>Buffer</code>, the UTF-16 2193encoding (e.g. <code>ucs</code> or <code>utf16le</code>) is not supported.</p> 2194<p><a id="ERR_HTTP2_FRAME_ERROR"></a></p> 2195<h4><code>ERR_HTTP2_FRAME_ERROR</code><span><a class="mark" href="#errors_err_http2_frame_error" id="errors_err_http2_frame_error">#</a></span></h4> 2196<div class="api_metadata"> 2197<span>Added in: v9.0.0</span><span>Removed in: v10.0.0</span> 2198</div> 2199<p>Used when a failure occurs sending an individual frame on the HTTP/2 2200session.</p> 2201<p><a id="ERR_HTTP2_HEADERS_OBJECT"></a></p> 2202<h4><code>ERR_HTTP2_HEADERS_OBJECT</code><span><a class="mark" href="#errors_err_http2_headers_object" id="errors_err_http2_headers_object">#</a></span></h4> 2203<div class="api_metadata"> 2204<span>Added in: v9.0.0</span><span>Removed in: v10.0.0</span> 2205</div> 2206<p>Used when an HTTP/2 Headers Object is expected.</p> 2207<p><a id="ERR_HTTP2_HEADER_REQUIRED"></a></p> 2208<h4><code>ERR_HTTP2_HEADER_REQUIRED</code><span><a class="mark" href="#errors_err_http2_header_required" id="errors_err_http2_header_required">#</a></span></h4> 2209<div class="api_metadata"> 2210<span>Added in: v9.0.0</span><span>Removed in: v10.0.0</span> 2211</div> 2212<p>Used when a required header is missing in an HTTP/2 message.</p> 2213<p><a id="ERR_HTTP2_INFO_HEADERS_AFTER_RESPOND"></a></p> 2214<h4><code>ERR_HTTP2_INFO_HEADERS_AFTER_RESPOND</code><span><a class="mark" href="#errors_err_http2_info_headers_after_respond" id="errors_err_http2_info_headers_after_respond">#</a></span></h4> 2215<div class="api_metadata"> 2216<span>Added in: v9.0.0</span><span>Removed in: v10.0.0</span> 2217</div> 2218<p>HTTP/2 informational headers must only be sent <em>prior</em> to calling the 2219<code>Http2Stream.prototype.respond()</code> method.</p> 2220<p><a id="ERR_HTTP2_STREAM_CLOSED"></a></p> 2221<h4><code>ERR_HTTP2_STREAM_CLOSED</code><span><a class="mark" href="#errors_err_http2_stream_closed" id="errors_err_http2_stream_closed">#</a></span></h4> 2222<div class="api_metadata"> 2223<span>Added in: v9.0.0</span><span>Removed in: v10.0.0</span> 2224</div> 2225<p>Used when an action has been performed on an HTTP/2 Stream that has already 2226been closed.</p> 2227<p><a id="ERR_HTTP_INVALID_CHAR"></a></p> 2228<h4><code>ERR_HTTP_INVALID_CHAR</code><span><a class="mark" href="#errors_err_http_invalid_char" id="errors_err_http_invalid_char">#</a></span></h4> 2229<div class="api_metadata"> 2230<span>Added in: v9.0.0</span><span>Removed in: v10.0.0</span> 2231</div> 2232<p>Used when an invalid character is found in an HTTP response status message 2233(reason phrase).</p> 2234<p><a id="ERR_HTTP_REQUEST_TIMEOUT"></a></p> 2235<h4><code>ERR_HTTP_REQUEST_TIMEOUT</code><span><a class="mark" href="#errors_err_http_request_timeout" id="errors_err_http_request_timeout">#</a></span></h4> 2236<p>The client has not sent the entire request within the allowed time.</p> 2237<p><a id="ERR_INDEX_OUT_OF_RANGE"></a></p> 2238<h4><code>ERR_INDEX_OUT_OF_RANGE</code><span><a class="mark" href="#errors_err_index_out_of_range" id="errors_err_index_out_of_range">#</a></span></h4> 2239<div class="api_metadata"> 2240<span>Added in: v10.0.0</span><span>Removed in: v11.0.0</span> 2241</div> 2242<p>A given index was out of the accepted range (e.g. negative offsets).</p> 2243<p><a id="ERR_NAPI_CONS_PROTOTYPE_OBJECT"></a></p> 2244<h4><code>ERR_NAPI_CONS_PROTOTYPE_OBJECT</code><span><a class="mark" href="#errors_err_napi_cons_prototype_object" id="errors_err_napi_cons_prototype_object">#</a></span></h4> 2245<div class="api_metadata"> 2246<span>Added in: v9.0.0</span><span>Removed in: v10.0.0</span> 2247</div> 2248<p>Used by the <code>Node-API</code> when <code>Constructor.prototype</code> is not an object.</p> 2249<p><a id="ERR_NO_LONGER_SUPPORTED"></a></p> 2250<h4><code>ERR_NO_LONGER_SUPPORTED</code><span><a class="mark" href="#errors_err_no_longer_supported" id="errors_err_no_longer_supported">#</a></span></h4> 2251<p>A Node.js API was called in an unsupported manner, such as 2252<code>Buffer.write(string, encoding, offset[, length])</code>.</p> 2253<p><a id="ERR_OUTOFMEMORY"></a></p> 2254<h4><code>ERR_OUTOFMEMORY</code><span><a class="mark" href="#errors_err_outofmemory" id="errors_err_outofmemory">#</a></span></h4> 2255<div class="api_metadata"> 2256<span>Added in: v9.0.0</span><span>Removed in: v10.0.0</span> 2257</div> 2258<p>Used generically to identify that an operation caused an out of memory 2259condition.</p> 2260<p><a id="ERR_PARSE_HISTORY_DATA"></a></p> 2261<h4><code>ERR_PARSE_HISTORY_DATA</code><span><a class="mark" href="#errors_err_parse_history_data" id="errors_err_parse_history_data">#</a></span></h4> 2262<div class="api_metadata"> 2263<span>Added in: v9.0.0</span><span>Removed in: v10.0.0</span> 2264</div> 2265<p>The <code>repl</code> module was unable to parse data from the REPL history file.</p> 2266<p><a id="ERR_SOCKET_CANNOT_SEND"></a></p> 2267<h4><code>ERR_SOCKET_CANNOT_SEND</code><span><a class="mark" href="#errors_err_socket_cannot_send" id="errors_err_socket_cannot_send">#</a></span></h4> 2268<div class="api_metadata"> 2269<span>Added in: v9.0.0</span><span>Removed in: v14.0.0</span> 2270</div> 2271<p>Data could not be sent on a socket.</p> 2272<p><a id="ERR_STDERR_CLOSE"></a></p> 2273<h4><code>ERR_STDERR_CLOSE</code><span><a class="mark" href="#errors_err_stderr_close" id="errors_err_stderr_close">#</a></span></h4> 2274<div class="api_metadata"> 2275<details class="changelog"><summary>History</summary> 2276<table> 2277<tbody><tr><th>Version</th><th>Changes</th></tr> 2278<tr><td>v10.12.0</td> 2279<td><p>Rather than emitting an error, <code>process.stderr.end()</code> now only closes the stream side but not the underlying resource, making this error obsolete.</p></td></tr> 2280<tr><td>v10.12.0</td> 2281<td><p><span>Removed in: v10.12.0</span></p></td></tr> 2282</tbody></table> 2283</details> 2284</div> 2285<p>An attempt was made to close the <code>process.stderr</code> stream. By design, Node.js 2286does not allow <code>stdout</code> or <code>stderr</code> streams to be closed by user code.</p> 2287<p><a id="ERR_STDOUT_CLOSE"></a></p> 2288<h4><code>ERR_STDOUT_CLOSE</code><span><a class="mark" href="#errors_err_stdout_close" id="errors_err_stdout_close">#</a></span></h4> 2289<div class="api_metadata"> 2290<details class="changelog"><summary>History</summary> 2291<table> 2292<tbody><tr><th>Version</th><th>Changes</th></tr> 2293<tr><td>v10.12.0</td> 2294<td><p>Rather than emitting an error, <code>process.stderr.end()</code> now only closes the stream side but not the underlying resource, making this error obsolete.</p></td></tr> 2295<tr><td>v10.12.0</td> 2296<td><p><span>Removed in: v10.12.0</span></p></td></tr> 2297</tbody></table> 2298</details> 2299</div> 2300<p>An attempt was made to close the <code>process.stdout</code> stream. By design, Node.js 2301does not allow <code>stdout</code> or <code>stderr</code> streams to be closed by user code.</p> 2302<p><a id="ERR_STREAM_READ_NOT_IMPLEMENTED"></a></p> 2303<h4><code>ERR_STREAM_READ_NOT_IMPLEMENTED</code><span><a class="mark" href="#errors_err_stream_read_not_implemented" id="errors_err_stream_read_not_implemented">#</a></span></h4> 2304<div class="api_metadata"> 2305<span>Added in: v9.0.0</span><span>Removed in: v10.0.0</span> 2306</div> 2307<p>Used when an attempt is made to use a readable stream that has not implemented 2308<a href="stream.html#stream_readable_read_size_1"><code>readable._read()</code></a>.</p> 2309<p><a id="ERR_TLS_RENEGOTIATION_FAILED"></a></p> 2310<h4><code>ERR_TLS_RENEGOTIATION_FAILED</code><span><a class="mark" href="#errors_err_tls_renegotiation_failed" id="errors_err_tls_renegotiation_failed">#</a></span></h4> 2311<div class="api_metadata"> 2312<span>Added in: v9.0.0</span><span>Removed in: v10.0.0</span> 2313</div> 2314<p>Used when a TLS renegotiation request has failed in a non-specific way.</p> 2315<p><a id="ERR_TRANSFERRING_EXTERNALIZED_SHAREDARRAYBUFFER"></a></p> 2316<h4><code>ERR_TRANSFERRING_EXTERNALIZED_SHAREDARRAYBUFFER</code><span><a class="mark" href="#errors_err_transferring_externalized_sharedarraybuffer" id="errors_err_transferring_externalized_sharedarraybuffer">#</a></span></h4> 2317<div class="api_metadata"> 2318<span>Added in: v10.5.0</span><span>Removed in: v14.0.0</span> 2319</div> 2320<p>A <code>SharedArrayBuffer</code> whose memory is not managed by the JavaScript engine 2321or by Node.js was encountered during serialization. Such a <code>SharedArrayBuffer</code> 2322cannot be serialized.</p> 2323<p>This can only happen when native addons create <code>SharedArrayBuffer</code>s in 2324"externalized" mode, or put existing <code>SharedArrayBuffer</code> into externalized mode.</p> 2325<p><a id="ERR_UNKNOWN_STDIN_TYPE"></a></p> 2326<h4><code>ERR_UNKNOWN_STDIN_TYPE</code><span><a class="mark" href="#errors_err_unknown_stdin_type" id="errors_err_unknown_stdin_type">#</a></span></h4> 2327<div class="api_metadata"> 2328<span>Added in: v8.0.0</span><span>Removed in: v11.7.0</span> 2329</div> 2330<p>An attempt was made to launch a Node.js process with an unknown <code>stdin</code> file 2331type. This error is usually an indication of a bug within Node.js itself, 2332although it is possible for user code to trigger it.</p> 2333<p><a id="ERR_UNKNOWN_STREAM_TYPE"></a></p> 2334<h4><code>ERR_UNKNOWN_STREAM_TYPE</code><span><a class="mark" href="#errors_err_unknown_stream_type" id="errors_err_unknown_stream_type">#</a></span></h4> 2335<div class="api_metadata"> 2336<span>Added in: v8.0.0</span><span>Removed in: v11.7.0</span> 2337</div> 2338<p>An attempt was made to launch a Node.js process with an unknown <code>stdout</code> or 2339<code>stderr</code> file type. This error is usually an indication of a bug within Node.js 2340itself, although it is possible for user code to trigger it.</p> 2341<p><a id="ERR_V8BREAKITERATOR"></a></p> 2342<h4><code>ERR_V8BREAKITERATOR</code><span><a class="mark" href="#errors_err_v8breakiterator" id="errors_err_v8breakiterator">#</a></span></h4> 2343<p>The V8 <code>BreakIterator</code> API was used but the full ICU data set is not installed.</p> 2344<p><a id="ERR_VALUE_OUT_OF_RANGE"></a></p> 2345<h4><code>ERR_VALUE_OUT_OF_RANGE</code><span><a class="mark" href="#errors_err_value_out_of_range" id="errors_err_value_out_of_range">#</a></span></h4> 2346<div class="api_metadata"> 2347<span>Added in: v9.0.0</span><span>Removed in: v10.0.0</span> 2348</div> 2349<p>Used when a given value is out of the accepted range.</p> 2350<p><a id="ERR_VM_MODULE_NOT_LINKED"></a></p> 2351<h4><code>ERR_VM_MODULE_NOT_LINKED</code><span><a class="mark" href="#errors_err_vm_module_not_linked" id="errors_err_vm_module_not_linked">#</a></span></h4> 2352<p>The module must be successfully linked before instantiation.</p> 2353<p><a id="ERR_ZLIB_BINDING_CLOSED"></a></p> 2354<h4><code>ERR_ZLIB_BINDING_CLOSED</code><span><a class="mark" href="#errors_err_zlib_binding_closed" id="errors_err_zlib_binding_closed">#</a></span></h4> 2355<div class="api_metadata"> 2356<span>Added in: v9.0.0</span><span>Removed in: v10.0.0</span> 2357</div> 2358<p>Used when an attempt is made to use a <code>zlib</code> object after it has already been 2359closed.</p></section> 2360 <!-- API END --> 2361 </div> 2362 </div> 2363 </div> 2364 <script> 2365 'use strict'; 2366 { 2367 const kCustomPreference = 'customDarkTheme'; 2368 const userSettings = sessionStorage.getItem(kCustomPreference); 2369 const themeToggleButton = document.getElementById('theme-toggle-btn'); 2370 if (userSettings === null && window.matchMedia) { 2371 const mq = window.matchMedia('(prefers-color-scheme: dark)'); 2372 if ('onchange' in mq) { 2373 function mqChangeListener(e) { 2374 document.body.classList.toggle('dark-mode', e.matches); 2375 } 2376 mq.addEventListener('change', mqChangeListener); 2377 if (themeToggleButton) { 2378 themeToggleButton.addEventListener('click', function() { 2379 mq.removeEventListener('change', mqChangeListener); 2380 }, { once: true }); 2381 } 2382 } 2383 if (mq.matches) { 2384 document.body.classList.add('dark-mode'); 2385 } 2386 } else if (userSettings === 'true') { 2387 document.body.classList.add('dark-mode'); 2388 } 2389 if (themeToggleButton) { 2390 themeToggleButton.hidden = false; 2391 themeToggleButton.addEventListener('click', function() { 2392 sessionStorage.setItem( 2393 kCustomPreference, 2394 document.body.classList.toggle('dark-mode') 2395 ); 2396 }); 2397 } 2398 } 2399 </script> 2400</body> 2401</html> 2402