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