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