A generic JavaScript <Error> object that does not denote any specific\ncircumstance of why the error occurred. Error objects capture a \"stack trace\"\ndetailing the point in the code at which the Error was instantiated, and may\nprovide a text description of the error.
Error
All errors generated by Node.js, including all system and JavaScript errors,\nwill either be instances of, or inherit from, the Error class.
Creates a .stack property on targetObject, which when accessed returns\na string representing the location in the code at which\nError.captureStackTrace() was called.
.stack
targetObject
Error.captureStackTrace()
const myObject = {};\nError.captureStackTrace(myObject);\nmyObject.stack; // Similar to `new Error().stack`\n
The first line of the trace will be prefixed with\n${myObject.name}: ${myObject.message}.
${myObject.name}: ${myObject.message}
The optional constructorOpt argument accepts a function. If given, all frames\nabove constructorOpt, including constructorOpt, will be omitted from the\ngenerated stack trace.
constructorOpt
The constructorOpt argument is useful for hiding implementation\ndetails of error generation from the user. For instance:
function MyError() {\n Error.captureStackTrace(this, MyError);\n}\n\n// Without passing MyError to captureStackTrace, the MyError\n// frame would show up in the .stack property. By passing\n// the constructor, we omit that frame, and retain all frames below it.\nnew MyError().stack;\n
The Error.stackTraceLimit property specifies the number of stack frames\ncollected by a stack trace (whether generated by new Error().stack or\nError.captureStackTrace(obj)).
Error.stackTraceLimit
new Error().stack
Error.captureStackTrace(obj)
The default value is 10 but may be set to any valid JavaScript number. Changes\nwill affect any stack trace captured after the value has been changed.
10
If set to a non-number value, or set to a negative number, stack traces will\nnot capture any frames.
If present, the error.cause property is the underlying cause of the Error.\nIt is used when catching an error and throwing a new one with a different\nmessage or code in order to still have access to the original error.
error.cause
The error.cause property is typically set by calling\nnew Error(message, { cause }). It is not set by the constructor if the\ncause option is not provided.
new Error(message, { cause })
cause
This property allows errors to be chained. When serializing Error objects,\nutil.inspect() recursively serializes error.cause if it is set.
util.inspect()
const cause = new Error('The remote HTTP server responded with a 500 status');\nconst symptom = new Error('The message failed to send', { cause });\n\nconsole.log(symptom);\n// Prints:\n// Error: The message failed to send\n// at REPL2:1:17\n// at Script.runInThisContext (node:vm:130:12)\n// ... 7 lines matching cause stack trace ...\n// at [_line] [as _line] (node:internal/readline/interface:886:18) {\n// [cause]: Error: The remote HTTP server responded with a 500 status\n// at REPL1:1:15\n// at Script.runInThisContext (node:vm:130:12)\n// at REPLServer.defaultEval (node:repl:574:29)\n// at bound (node:domain:426:15)\n// at REPLServer.runBound [as eval] (node:domain:437:12)\n// at REPLServer.onLine (node:repl:902:10)\n// at REPLServer.emit (node:events:549:35)\n// at REPLServer.emit (node:domain:482:12)\n// at [_onLine] [as _onLine] (node:internal/readline/interface:425:12)\n// at [_line] [as _line] (node:internal/readline/interface:886:18)\n
The error.code property is a string label that identifies the kind of error.\nerror.code is the most stable way to identify an error. It will only change\nbetween major versions of Node.js. In contrast, error.message strings may\nchange between any versions of Node.js. See Node.js error codes for details\nabout specific codes.
error.code
error.message
The error.message property is the string description of the error as set by\ncalling new Error(message). The message passed to the constructor will also\nappear in the first line of the stack trace of the Error, however changing\nthis property after the Error object is created may not change the first\nline of the stack trace (for example, when error.stack is read before this\nproperty is changed).
new Error(message)
message
error.stack
const err = new Error('The message');\nconsole.error(err.message);\n// Prints: The message\n
The error.stack property is a string describing the point in the code at which\nthe Error was instantiated.
Error: Things keep happening!\n at /home/gbusey/file.js:525:2\n at Frobnicator.refrobulate (/home/gbusey/business-logic.js:424:21)\n at Actor.<anonymous> (/home/gbusey/actors.js:400:8)\n at increaseSynergy (/home/gbusey/actors.js:701:6)\n
The first line is formatted as <error class name>: <error message>, and\nis followed by a series of stack frames (each line beginning with \"at \").\nEach frame describes a call site within the code that lead to the error being\ngenerated. V8 attempts to display a name for each function (by variable name,\nfunction name, or object method name), but occasionally it will not be able to\nfind a suitable name. If V8 cannot determine a name for the function, only\nlocation information will be displayed for that frame. Otherwise, the\ndetermined function name will be displayed with location information appended\nin parentheses.
<error class name>: <error message>
Frames are only generated for JavaScript functions. If, for example, execution\nsynchronously passes through a C++ addon function called cheetahify which\nitself calls a JavaScript function, the frame representing the cheetahify call\nwill not be present in the stack traces:
cheetahify
const cheetahify = require('./native-binding.node');\n\nfunction makeFaster() {\n // `cheetahify()` *synchronously* calls speedy.\n cheetahify(function speedy() {\n throw new Error('oh no!');\n });\n}\n\nmakeFaster();\n// will throw:\n// /home/gbusey/file.js:6\n// throw new Error('oh no!');\n// ^\n// Error: oh no!\n// at speedy (/home/gbusey/file.js:6:11)\n// at makeFaster (/home/gbusey/file.js:5:3)\n// at Object.<anonymous> (/home/gbusey/file.js:10:1)\n// at Module._compile (module.js:456:26)\n// at Object.Module._extensions..js (module.js:474:10)\n// at Module.load (module.js:356:32)\n// at Function.Module._load (module.js:312:12)\n// at Function.Module.runMain (module.js:497:10)\n// at startup (node.js:119:16)\n// at node.js:906:3\n
The location information will be one of:
native
[].forEach
plain-filename.js:line:column
/absolute/path/to/file.js:line:column
<transport-protocol>:///url/to/module/file.mjs:line:column
The string representing the stack trace is lazily generated when the\nerror.stack property is accessed.
The number of frames captured by the stack trace is bounded by the smaller of\nError.stackTraceLimit or the number of available frames on the current event\nloop tick.
Creates a new Error object and sets the error.message property to the\nprovided text message. If an object is passed as message, the text message\nis generated by calling String(message). If the cause option is provided,\nit is assigned to the error.cause property. The error.stack property will\nrepresent the point in the code at which new Error() was called. Stack traces\nare dependent on V8's stack trace API. Stack traces extend only to either\n(a) the beginning of synchronous code execution, or (b) the number of frames\ngiven by the property Error.stackTraceLimit, whichever is smaller.
String(message)
new Error()
Indicates the failure of an assertion. For details, see\nClass: assert.AssertionError.
Class: assert.AssertionError
Indicates that a provided argument was not within the set or range of\nacceptable values for a function; whether that is a numeric range, or\noutside the set of options for a given function parameter.
require('node:net').connect(-1);\n// Throws \"RangeError: \"port\" option should be >= 0 and < 65536: -1\"\n
Node.js will generate and throw RangeError instances immediately as a form\nof argument validation.
RangeError
Indicates that an attempt is being made to access a variable that is not\ndefined. Such errors commonly indicate typos in code, or an otherwise broken\nprogram.
While client code may generate and propagate these errors, in practice, only V8\nwill do so.
doesNotExist;\n// Throws ReferenceError, doesNotExist is not a variable in this program.\n
Unless an application is dynamically generating and running code,\nReferenceError instances indicate a bug in the code or its dependencies.
ReferenceError
Indicates that a program is not valid JavaScript. These errors may only be\ngenerated and propagated as a result of code evaluation. Code evaluation may\nhappen as a result of eval, Function, require, or vm. These errors\nare almost always indicative of a broken program.
eval
Function
require
try {\n require('node:vm').runInThisContext('binary ! isNotOk');\n} catch (err) {\n // 'err' will be a SyntaxError.\n}\n
SyntaxError instances are unrecoverable in the context that created them –\nthey may only be caught by other contexts.
SyntaxError
Node.js generates system errors when exceptions occur within its runtime\nenvironment. These usually occur when an application violates an operating\nsystem constraint. For example, a system error will occur if an application\nattempts to read a file that does not exist.
address
code
dest
errno
info
path
port
syscall
If present, error.address is a string describing the address to which a\nnetwork connection failed.
error.address
The error.code property is a string representing the error code.
If present, error.dest is the file path destination when reporting a file\nsystem error.
error.dest
The error.errno property is a negative number which corresponds\nto the error code defined in libuv Error handling.
error.errno
libuv Error handling
On Windows the error number provided by the system will be normalized by libuv.
To get the string representation of the error code, use\nutil.getSystemErrorName(error.errno).
util.getSystemErrorName(error.errno)
If present, error.info is an object with details about the error condition.
error.info
error.message is a system-provided human-readable description of the error.
If present, error.path is a string containing a relevant invalid pathname.
error.path
If present, error.port is the network connection port that is not available.
error.port
The error.syscall property is a string describing the syscall that failed.
error.syscall
This is a list of system errors commonly-encountered when writing a Node.js\nprogram. For a comprehensive list, see the errno(3) man page.
EACCES (Permission denied): An attempt was made to access a file in a way\nforbidden by its file access permissions.
EACCES
EADDRINUSE (Address already in use): An attempt to bind a server\n(net, http, or https) to a local address failed due to\nanother server on the local system already occupying that address.
EADDRINUSE
net
http
https
ECONNREFUSED (Connection refused): No connection could be made because the\ntarget machine actively refused it. This usually results from trying to\nconnect to a service that is inactive on the foreign host.
ECONNREFUSED
ECONNRESET (Connection reset by peer): A connection was forcibly closed by\na peer. This normally results from a loss of the connection on the remote\nsocket due to a timeout or reboot. Commonly encountered via the http\nand net modules.
ECONNRESET
EEXIST (File exists): An existing file was the target of an operation that\nrequired that the target not exist.
EEXIST
EISDIR (Is a directory): An operation expected a file, but the given\npathname was a directory.
EISDIR
EMFILE (Too many open files in system): Maximum number of\nfile descriptors allowable on the system has been reached, and\nrequests for another descriptor cannot be fulfilled until at least one\nhas been closed. This is encountered when opening many files at once in\nparallel, especially on systems (in particular, macOS) where there is a low\nfile descriptor limit for processes. To remedy a low limit, run\nulimit -n 2048 in the same shell that will run the Node.js process.
EMFILE
ulimit -n 2048
ENOENT (No such file or directory): Commonly raised by fs operations\nto indicate that a component of the specified pathname does not exist. No\nentity (file or directory) could be found by the given path.
ENOENT
fs
ENOTDIR (Not a directory): A component of the given pathname existed, but\nwas not a directory as expected. Commonly raised by fs.readdir.
ENOTDIR
fs.readdir
ENOTEMPTY (Directory not empty): A directory with entries was the target\nof an operation that requires an empty directory, usually fs.unlink.
ENOTEMPTY
fs.unlink
ENOTFOUND (DNS lookup failed): Indicates a DNS failure of either\nEAI_NODATA or EAI_NONAME. This is not a standard POSIX error.
ENOTFOUND
EAI_NODATA
EAI_NONAME
EPERM (Operation not permitted): An attempt was made to perform an\noperation that requires elevated privileges.
EPERM
EPIPE (Broken pipe): A write on a pipe, socket, or FIFO for which there is\nno process to read the data. Commonly encountered at the net and\nhttp layers, indicative that the remote side of the stream being\nwritten to has been closed.
EPIPE
ETIMEDOUT (Operation timed out): A connect or send request failed because\nthe connected party did not properly respond after a period of time. Usually\nencountered by http or net. Often a sign that a socket.end()\nwas not properly called.
ETIMEDOUT
socket.end()
Indicates that a provided argument is not an allowable type. For example,\npassing a function to a parameter which expects a string would be a TypeError.
TypeError
require('node:url').parse(() => { });\n// Throws TypeError, since it expected a string.\n
Node.js will generate and throw TypeError instances immediately as a form\nof argument validation.
Applications running in Node.js will generally experience four categories of\nerrors:
AssertionError
node:assert
All JavaScript and system errors raised by Node.js inherit from, or are\ninstances of, the standard JavaScript <Error> class and are guaranteed\nto provide at least the properties available on that class.
Node.js supports several mechanisms for propagating and handling errors that\noccur while an application is running. How these errors are reported and\nhandled depends entirely on the type of Error and the style of the API that is\ncalled.
All JavaScript errors are handled as exceptions that immediately generate\nand throw an error using the standard JavaScript throw mechanism. These\nare handled using the try…catch construct provided by the\nJavaScript language.
throw
try…catch
// Throws with a ReferenceError because z is not defined.\ntry {\n const m = 1;\n const n = m + z;\n} catch (err) {\n // Handle the error here.\n}\n
Any use of the JavaScript throw mechanism will raise an exception that\nmust be handled using try…catch or the Node.js process will exit\nimmediately.
With few exceptions, Synchronous APIs (any blocking method that does not\naccept a callback function, such as fs.readFileSync), will use throw\nto report errors.
callback
fs.readFileSync
Errors that occur within Asynchronous APIs may be reported in multiple ways:
Most asynchronous methods that accept a callback function will accept an\nError object passed as the first argument to that function. If that first\nargument is not null and is an instance of Error, then an error occurred\nthat should be handled.
null
const fs = require('node:fs');\nfs.readFile('a file that does not exist', (err, data) => {\n if (err) {\n console.error('There was an error reading the file!', err);\n return;\n }\n // Otherwise handle the data\n});\n
When an asynchronous method is called on an object that is an\nEventEmitter, errors can be routed to that object's 'error' event.
EventEmitter
'error'
const net = require('node:net');\nconst connection = net.connect('localhost');\n\n// Adding an 'error' event handler to a stream:\nconnection.on('error', (err) => {\n // If the connection is reset by the server, or if it can't\n // connect at all, or on any sort of error encountered by\n // the connection, the error will be sent here.\n console.error(err);\n});\n\nconnection.pipe(process.stdout);\n
A handful of typically asynchronous methods in the Node.js API may still\nuse the throw mechanism to raise exceptions that must be handled using\ntry…catch. There is no comprehensive list of such methods; please\nrefer to the documentation of each method to determine the appropriate\nerror handling mechanism required.
The use of the 'error' event mechanism is most common for stream-based\nand event emitter-based APIs, which themselves represent a series of\nasynchronous operations over time (as opposed to a single operation that may\npass or fail).
For all EventEmitter objects, if an 'error' event handler is not\nprovided, the error will be thrown, causing the Node.js process to report an\nuncaught exception and crash unless either: The domain module is\nused appropriately or a handler has been registered for the\n'uncaughtException' event.
domain
'uncaughtException'
const EventEmitter = require('node:events');\nconst ee = new EventEmitter();\n\nsetImmediate(() => {\n // This will crash the process because no 'error' event\n // handler has been added.\n ee.emit('error', new Error('This will crash'));\n});\n
Errors generated in this way cannot be intercepted using try…catch as\nthey are thrown after the calling code has already exited.
Developers must refer to the documentation for each method to determine\nexactly how errors raised by those methods are propagated.
Most asynchronous methods exposed by the Node.js core API follow an idiomatic\npattern referred to as an error-first callback. With this pattern, a callback\nfunction is passed to the method as an argument. When the operation either\ncompletes or an error is raised, the callback function is called with the\nError object (if any) passed as the first argument. If no error was raised,\nthe first argument will be passed as null.
const fs = require('node:fs');\n\nfunction errorFirstCallback(err, data) {\n if (err) {\n console.error('There was an error', err);\n return;\n }\n console.log(data);\n}\n\nfs.readFile('/some/file/that/does-not-exist', errorFirstCallback);\nfs.readFile('/some/file/that/does-exist', errorFirstCallback);\n
The JavaScript try…catch mechanism cannot be used to intercept errors\ngenerated by asynchronous APIs. A common mistake for beginners is to try to\nuse throw inside an error-first callback:
// THIS WILL NOT WORK:\nconst fs = require('node:fs');\n\ntry {\n fs.readFile('/some/file/that/does-not-exist', (err, data) => {\n // Mistaken assumption: throwing here...\n if (err) {\n throw err;\n }\n });\n} catch (err) {\n // This will not catch the throw!\n console.error(err);\n}\n
This will not work because the callback function passed to fs.readFile() is\ncalled asynchronously. By the time the callback has been called, the\nsurrounding code, including the try…catch block, will have already exited.\nThrowing an error inside the callback can crash the Node.js process in most\ncases. If domains are enabled, or a handler has been registered with\nprocess.on('uncaughtException'), such errors can be intercepted.
fs.readFile()
process.on('uncaughtException')
A JavaScript exception is a value that is thrown as a result of an invalid\noperation or as the target of a throw statement. While it is not required\nthat these values are instances of Error or classes which inherit from\nError, all exceptions thrown by Node.js or the JavaScript runtime will be\ninstances of Error.
Some exceptions are unrecoverable at the JavaScript layer. Such exceptions\nwill always cause the Node.js process to crash. Examples include assert()\nchecks or abort() calls in the C++ layer.
assert()
abort()
Errors originating in crypto or tls are of class Error, and in addition to\nthe standard .code and .message properties, may have some additional\nOpenSSL-specific properties.
crypto
tls
.code
.message
An array of errors that can give context to where in the OpenSSL library an\nerror originates from.
The OpenSSL function the error originates in.
The OpenSSL library the error originates in.
A human-readable string describing the reason for the error.
Used when an operation has been aborted (typically using an AbortController).
AbortController
APIs not using AbortSignals typically do not raise an error with this code.
AbortSignal
This code does not use the regular ERR_* convention Node.js errors use in\norder to be compatible with the web platform's AbortError.
ERR_*
AbortError
A special type of error that is triggered whenever Node.js tries to get access\nto a resource restricted by the policy manifest.\nFor example, process.binding.
process.binding
A function argument is being used in a way that suggests that the function\nsignature may be misunderstood. This is thrown by the node:assert module when\nthe message parameter in assert.throws(block, message) matches the error\nmessage thrown by block because that usage suggests that the user believes\nmessage is the expected message rather than the message the AssertionError\nwill display if block does not throw.
assert.throws(block, message)
block
An iterable argument (i.e. a value that works with for...of loops) was\nrequired, but not provided to a Node.js API.
for...of
A special type of error that can be triggered whenever Node.js detects an\nexceptional logic violation that should never occur. These are raised typically\nby the node:assert module.
An attempt was made to register something that is not a function as an\nAsyncHooks callback.
AsyncHooks
The type of an asynchronous resource was invalid. Users are also able\nto define their own types if using the public embedder API.
Data passed to a Brotli stream was not successfully compressed.
An invalid parameter key was passed during construction of a Brotli stream.
An attempt was made to create a Node.js Buffer instance from addon or embedder\ncode, while in a JS engine Context that is not associated with a Node.js\ninstance. The data passed to the Buffer method will have been released\nby the time the method returns.
Buffer
When encountering this error, a possible alternative to creating a Buffer\ninstance is to create a normal Uint8Array, which only differs in the\nprototype of the resulting object. Uint8Arrays are generally accepted in all\nNode.js core APIs where Buffers are; they are available in all Contexts.
Uint8Array
An operation outside the bounds of a Buffer was attempted.
An attempt has been made to create a Buffer larger than the maximum allowed\nsize.
Node.js was unable to watch for the SIGINT signal.
SIGINT
A child process was closed before the parent received a reply.
Used when a child process is being forked without specifying an IPC channel.
Used when the main process is trying to read data from the child process's\nSTDERR/STDOUT, and the data's length is longer than the maxBuffer option.
maxBuffer
There was an attempt to use a MessagePort instance in a closed\nstate, usually after .close() has been called.
MessagePort
.close()
Console was instantiated without stdout stream, or Console has a\nnon-writable stdout or stderr stream.
Console
stdout
stderr
A class constructor was called that is not callable.
A constructor for a class was called without new.
new
The vm context passed into the API is not yet initialized. This could happen\nwhen an error occurs (and is caught) during the creation of the\ncontext, for example, when the allocation fails or the maximum call stack\nsize is reached when the context is created.
A client certificate engine was requested that is not supported by the version\nof OpenSSL being used.
An invalid value for the format argument was passed to the crypto.ECDH()\nclass getPublicKey() method.
format
crypto.ECDH()
getPublicKey()
An invalid value for the key argument has been passed to the\ncrypto.ECDH() class computeSecret() method. It means that the public\nkey lies outside of the elliptic curve.
key
computeSecret()
An invalid crypto engine identifier was passed to\nrequire('node:crypto').setEngine().
require('node:crypto').setEngine()
The --force-fips command-line argument was used but there was an attempt\nto enable or disable FIPS mode in the node:crypto module.
--force-fips
node:crypto
An attempt was made to enable or disable FIPS mode, but FIPS mode was not\navailable.
hash.digest() was called multiple times. The hash.digest() method must\nbe called no more than one time per instance of a Hash object.
hash.digest()
Hash
hash.update() failed for any reason. This should rarely, if ever, happen.
hash.update()
The given crypto keys are incompatible with the attempted operation.
The selected public or private key encoding is incompatible with other options.
Initialization of the crypto subsystem failed.
An invalid authentication tag was provided.
An invalid counter was provided for a counter-mode cipher.
An invalid elliptic-curve was provided.
An invalid crypto digest algorithm was specified.
An invalid initialization vector was provided.
An invalid JSON Web Key was provided.
The given crypto key object's type is invalid for the attempted operation.
An invalid key length was provided.
An invalid key pair was provided.
An invalid key type was provided.
An invalid message length was provided.
Invalid scrypt algorithm parameters were provided.
A crypto method was used on an object that was in an invalid state. For\ninstance, calling cipher.getAuthTag() before calling cipher.final().
cipher.getAuthTag()
cipher.final()
An invalid authentication tag length was provided.
Initialization of an asynchronous crypto operation failed.
Key's Elliptic Curve is not registered for use in the\nJSON Web Key Elliptic Curve Registry.
Key's Asymmetric Key Type is not registered for use in the\nJSON Web Key Types Registry.
A crypto operation failed for an otherwise unspecified reason.
The PBKDF2 algorithm failed for unspecified reasons. OpenSSL does not provide\nmore details and therefore neither does Node.js.
One or more crypto.scrypt() or crypto.scryptSync() parameters are\noutside their legal range.
crypto.scrypt()
crypto.scryptSync()
Node.js was compiled without scrypt support. Not possible with the official\nrelease binaries but can happen with custom builds, including distro builds.
scrypt
A signing key was not provided to the sign.sign() method.
sign.sign()
crypto.timingSafeEqual() was called with Buffer, TypedArray, or\nDataView arguments of different lengths.
crypto.timingSafeEqual()
TypedArray
DataView
An unknown cipher was specified.
An unknown Diffie-Hellman group name was given. See\ncrypto.getDiffieHellman() for a list of valid group names.
crypto.getDiffieHellman()
An attempt to invoke an unsupported crypto operation was made.
An error occurred with the debugger.
The debugger timed out waiting for the required host/port to be free.
Loading native addons has been disabled using --no-addons.
--no-addons
A call to process.dlopen() failed.
process.dlopen()
The fs.Dir was previously closed.
fs.Dir
A synchronous read or close call was attempted on an fs.Dir which has\nongoing asynchronous operations.
c-ares failed to set the DNS server.
c-ares
The node:domain module was not usable since it could not establish the\nrequired error handling hooks, because\nprocess.setUncaughtExceptionCaptureCallback() had been called at an\nearlier point in time.
node:domain
process.setUncaughtExceptionCaptureCallback()
process.setUncaughtExceptionCaptureCallback() could not be called\nbecause the node:domain module has been loaded at an earlier point in time.
The stack trace is extended to include the point in time at which the\nnode:domain module had been loaded.
v8.startupSnapshot.setDeserializeMainFunction() could not be called\nbecause it had already been called before.
v8.startupSnapshot.setDeserializeMainFunction()
Data provided to TextDecoder() API was invalid according to the encoding\nprovided.
TextDecoder()
Encoding provided to TextDecoder() API was not one of the\nWHATWG Supported Encodings.
--print cannot be used with ESM input.
--print
Thrown when an attempt is made to recursively dispatch an event on EventTarget.
EventTarget
The JS execution context is not associated with a Node.js environment.\nThis may occur when Node.js is used as an embedded library and some hooks\nfor the JS engine are not set up properly.
A Promise that was callbackified via util.callbackify() was rejected with a\nfalsy value.
Promise
util.callbackify()
Used when a feature that is not available\nto the current platform which is running Node.js is used.
An attempt was made to copy a directory to a non-directory (file, symlink,\netc.) using fs.cp().
fs.cp()
An attempt was made to copy over a file that already existed with\nfs.cp(), with the force and errorOnExist set to true.
force
errorOnExist
true
When using fs.cp(), src or dest pointed to an invalid path.
src
Response body size doesn't match with the specified content-length header value.
An attempt was made to copy a named pipe with fs.cp().
An attempt was made to copy a non-directory (file, symlink, etc.) to a directory\nusing fs.cp().
An attempt was made to copy to a socket with fs.cp().
When using fs.cp(), a symlink in dest pointed to a subdirectory\nof src.
An attempt was made to copy to an unknown file type with fs.cp().
Path is a directory.
An attempt has been made to read a file whose size is larger than the maximum\nallowed size for a Buffer.
An invalid symlink type was passed to the fs.symlink() or\nfs.symlinkSync() methods.
fs.symlink()
fs.symlinkSync()
An attempt was made to add more headers after the headers had already been sent.
An invalid HTTP header value was specified.
Status code was outside the regular status code range (100-999).
The client has not sent the entire request within the allowed time.
Changing the socket encoding is not allowed per RFC 7230 Section 3.
The Trailer header was set even though the transfer encoding does not support\nthat.
Trailer
HTTP/2 ALTSVC frames require a valid origin.
HTTP/2 ALTSVC frames are limited to a maximum of 16,382 payload bytes.
For HTTP/2 requests using the CONNECT method, the :authority pseudo-header\nis required.
CONNECT
:authority
For HTTP/2 requests using the CONNECT method, the :path pseudo-header is\nforbidden.
:path
For HTTP/2 requests using the CONNECT method, the :scheme pseudo-header is\nforbidden.
:scheme
A non-specific HTTP/2 error has occurred.
New HTTP/2 Streams may not be opened after the Http2Session has received a\nGOAWAY frame from the connected peer.
Http2Session
GOAWAY
Multiple values were provided for an HTTP/2 header field that was required to\nhave only a single value.
An additional headers was specified after an HTTP/2 response was initiated.
An attempt was made to send multiple response headers.
Informational HTTP status codes (1xx) may not be set as the response status\ncode on HTTP/2 responses.
1xx
HTTP/1 connection specific headers are forbidden to be used in HTTP/2\nrequests and responses.
An invalid HTTP/2 header value was specified.
An invalid HTTP informational status code has been specified. Informational\nstatus codes must be an integer between 100 and 199 (inclusive).
100
199
HTTP/2 ORIGIN frames require a valid origin.
ORIGIN
Input Buffer and Uint8Array instances passed to the\nhttp2.getUnpackedSettings() API must have a length that is a multiple of\nsix.
http2.getUnpackedSettings()
Only valid HTTP/2 pseudoheaders (:status, :path, :authority, :scheme,\nand :method) may be used.
:status
:method
An action was performed on an Http2Session object that had already been\ndestroyed.
An invalid value has been specified for an HTTP/2 setting.
An operation was performed on a stream that had already been destroyed.
Whenever an HTTP/2 SETTINGS frame is sent to a connected peer, the peer is\nrequired to send an acknowledgment that it has received and applied the new\nSETTINGS. By default, a maximum number of unacknowledged SETTINGS frames may\nbe sent at any given time. This error code is used when that limit has been\nreached.
SETTINGS
An attempt was made to initiate a new push stream from within a push stream.\nNested push streams are not permitted.
Out of memory when using the http2session.setLocalWindowSize(windowSize) API.
http2session.setLocalWindowSize(windowSize)
An attempt was made to directly manipulate (read, write, pause, resume, etc.) a\nsocket attached to an Http2Session.
HTTP/2 ORIGIN frames are limited to a length of 16382 bytes.
The number of streams created on a single HTTP/2 session reached the maximum\nlimit.
A message payload was specified for an HTTP response code for which a payload is\nforbidden.
An HTTP/2 ping was canceled.
HTTP/2 ping payloads must be exactly 8 bytes in length.
An HTTP/2 pseudo-header has been used inappropriately. Pseudo-headers are header\nkey names that begin with the : prefix.
:
An attempt was made to create a push stream, which had been disabled by the\nclient.
An attempt was made to use the Http2Stream.prototype.responseWithFile() API to\nsend a directory.
Http2Stream.prototype.responseWithFile()
An attempt was made to use the Http2Stream.prototype.responseWithFile() API to\nsend something other than a regular file, but offset or length options were\nprovided.
offset
length
The Http2Session closed with a non-zero error code.
The Http2Session settings canceled.
An attempt was made to connect a Http2Session object to a net.Socket or\ntls.TLSSocket that had already been bound to another Http2Session object.
net.Socket
tls.TLSSocket
An attempt was made to use the socket property of an Http2Session that\nhas already been closed.
socket
Use of the 101 Informational status code is forbidden in HTTP/2.
101
An invalid HTTP status code has been specified. Status codes must be an integer\nbetween 100 and 599 (inclusive).
599
An Http2Stream was destroyed before any data was transmitted to the connected\npeer.
Http2Stream
A non-zero error code was been specified in an RST_STREAM frame.
RST_STREAM
When setting the priority for an HTTP/2 stream, the stream may be marked as\na dependency for a parent stream. This error code is used when an attempt is\nmade to mark a stream and dependent of itself.
The limit of acceptable invalid HTTP/2 protocol frames sent by the peer,\nas specified through the maxSessionInvalidFrames option, has been exceeded.
maxSessionInvalidFrames
Trailing headers have already been sent on the Http2Stream.
The http2stream.sendTrailers() method cannot be called until after the\n'wantTrailers' event is emitted on an Http2Stream object. The\n'wantTrailers' event will only be emitted if the waitForTrailers option\nis set for the Http2Stream.
http2stream.sendTrailers()
'wantTrailers'
waitForTrailers
http2.connect() was passed a URL that uses any protocol other than http: or\nhttps:.
http2.connect()
http:
https:
An attempt was made to construct an object using a non-public constructor.
An import assertion has failed, preventing the specified module to be imported.
An import assertion is missing, preventing the specified module to be imported.
An import assertion is not supported by this version of Node.js.
An option pair is incompatible with each other and cannot be used at the same\ntime.
The --input-type flag was used to attempt to execute a file. This flag can\nonly be used with input via --eval, --print, or STDIN.
--input-type
--eval
STDIN
While using the node:inspector module, an attempt was made to activate the\ninspector when it already started to listen on a port. Use inspector.close()\nbefore activating it on a different address.
node:inspector
inspector.close()
While using the node:inspector module, an attempt was made to connect when the\ninspector was already connected.
While using the node:inspector module, an attempt was made to use the\ninspector after the session had already closed.
An error occurred while issuing a command via the node:inspector module.
The inspector is not active when inspector.waitForDebugger() is called.
inspector
inspector.waitForDebugger()
The node:inspector module is not available for use.
While using the node:inspector module, an attempt was made to use the\ninspector before it was connected.
An API was called on the main thread that can only be used from\nthe worker thread.
There was a bug in Node.js or incorrect usage of Node.js internals.\nTo fix the error, open an issue at https://github.com/nodejs/node/issues.
The provided address family is not understood by the Node.js API.
An argument of the wrong type was passed to a Node.js API.
An invalid or unsupported value was passed for a given argument.
An invalid asyncId or triggerAsyncId was passed using AsyncHooks. An id\nless than -1 should never happen.
asyncId
triggerAsyncId
A swap was performed on a Buffer but its size was not compatible with the\noperation.
A callback function was required but was not been provided to a Node.js API.
Invalid characters were detected in headers.
A cursor on a given stream cannot be moved to a specified row without a\nspecified column.
A file descriptor ('fd') was not valid (e.g. it was a negative value).
A file descriptor ('fd') type was not valid.
A Node.js API that consumes file: URLs (such as certain functions in the\nfs module) encountered a file URL with an incompatible host. This\nsituation can only occur on Unix-like systems where only localhost or an empty\nhost is supported.
file:
localhost
A Node.js API that consumes file: URLs (such as certain functions in the\nfs module) encountered a file URL with an incompatible path. The exact\nsemantics for determining whether a path can be used is platform-dependent.
An attempt was made to send an unsupported \"handle\" over an IPC communication\nchannel to a child process. See subprocess.send() and process.send()\nfor more information.
subprocess.send()
process.send()
An invalid HTTP token was supplied.
An IP address is not valid.
An attempt was made to load a module that does not exist or was otherwise not\nvalid.
The imported module string is an invalid URL, package name, or package subpath\nspecifier.
An invalid package.json file failed parsing.
package.json
The package.json \"exports\" field contains an invalid target mapping\nvalue for the attempted module resolution.
\"exports\"
While using the Performance Timing API (perf_hooks), a performance mark is\ninvalid.
perf_hooks
An invalid options.protocol was passed to http.request().
options.protocol
http.request()
Both breakEvalOnSigint and eval options were set in the REPL config,\nwhich is not supported.
breakEvalOnSigint
REPL
The input may not be used in the REPL. The conditions under which this\nerror is used are described in the REPL documentation.
Thrown in case a function option does not provide a valid value for one of its\nreturned object properties on execution.
Thrown in case a function option does not provide an expected value\ntype for one of its returned object properties on execution.
Thrown in case a function option does not return an expected value\ntype on execution, such as when a function is expected to return a promise.
Indicates that an operation cannot be completed due to an invalid state.\nFor instance, an object may have already been destroyed, or may be\nperforming another operation.
A Buffer, TypedArray, DataView, or string was provided as stdio input to\nan asynchronous fork. See the documentation for the child_process module\nfor more information.
string
child_process
A Node.js API function was called with an incompatible this value.
this
const urlSearchParams = new URLSearchParams('foo=bar&baz=new');\n\nconst buf = Buffer.alloc(1);\nurlSearchParams.has.call(buf, 'foo');\n// Throws a TypeError with code 'ERR_INVALID_THIS'\n
An invalid transfer object was passed to postMessage().
postMessage()
An element in the iterable provided to the WHATWG\nURLSearchParams constructor did not\nrepresent a [name, value] tuple – that is, if an element is not iterable, or\ndoes not consist of exactly two elements.
iterable
URLSearchParams
[name, value]
An invalid URI was passed.
An invalid URL was passed to the WHATWG\nURL constructor to be parsed. The thrown error object\ntypically has an additional property 'input' that contains the URL that failed\nto parse.
URL
'input'
An attempt was made to use a URL of an incompatible scheme (protocol) for a\nspecific purpose. It is only used in the WHATWG URL API support in the\nfs module (which only accepts URLs with 'file' scheme), but may be used\nin other Node.js APIs as well in the future.
'file'
An attempt was made to use an IPC communication channel that was already closed.
An attempt was made to disconnect an IPC communication channel that was already\ndisconnected. See the documentation for the child_process module\nfor more information.
An attempt was made to create a child Node.js process using more than one IPC\ncommunication channel. See the documentation for the child_process module\nfor more information.
An attempt was made to open an IPC communication channel with a synchronously\nforked Node.js process. See the documentation for the child_process module\nfor more information.
An ESM loader hook returned without calling next() and without explicitly\nsignaling a short circuit.
next()
An attempt was made to load a resource, but the resource did not match the\nintegrity defined by the policy manifest. See the documentation for policy\nmanifests for more information.
An attempt was made to load a resource, but the resource was not listed as a\ndependency from the location that attempted to load it. See the documentation\nfor policy manifests for more information.
An attempt was made to load a policy manifest, but the manifest had multiple\nentries for a resource which did not match each other. Update the manifest\nentries to match in order to resolve this error. See the documentation for\npolicy manifests for more information.
A policy manifest resource had an invalid value for one of its fields. Update\nthe manifest entry to match in order to resolve this error. See the\ndocumentation for policy manifests for more information.
A policy manifest resource had an invalid value for one of its dependency\nmappings. Update the manifest entry to match to resolve this error. See the\ndocumentation for policy manifests for more information.
An attempt was made to load a policy manifest, but the manifest was unable to\nbe parsed. See the documentation for policy manifests for more information.
An attempt was made to read from a policy manifest, but the manifest\ninitialization has not yet taken place. This is likely a bug in Node.js.
A policy manifest was loaded, but had an unknown value for its \"onerror\"\nbehavior. See the documentation for policy manifests for more information.
An attempt was made to allocate memory (usually in the C++ layer) but it\nfailed.
A message posted to a MessagePort could not be deserialized in the target\nvm Context. Not all Node.js objects can be successfully instantiated in\nany context at this time, and attempting to transfer them using postMessage()\ncan fail on the receiving side in that case.
Context
A method is required but not implemented.
A required argument of a Node.js API was not passed. This is only used for\nstrict compliance with the API specification (which in some cases may accept\nfunc(undefined) but not func()). In most native Node.js APIs,\nfunc(undefined) and func() are treated identically, and the\nERR_INVALID_ARG_TYPE error code may be used instead.
func(undefined)
func()
ERR_INVALID_ARG_TYPE
For APIs that accept options objects, some options might be mandatory. This code\nis thrown if a required option is missing.
An attempt was made to read an encrypted key without specifying a passphrase.
The V8 platform used by this instance of Node.js does not support creating\nWorkers. This is caused by lack of embedder support for Workers. In particular,\nthis error will not occur with standard builds of Node.js.
An object that needs to be explicitly listed in the transferList argument\nis in the object passed to a postMessage() call, but is not provided\nin the transferList for that call. Usually, this is a MessagePort.
transferList
In Node.js versions prior to v15.0.0, the error code being used here was\nERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST. However, the set of\ntransferable object types has been expanded to cover more types than\nMessagePort.
ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST
A module file could not be resolved by the ECMAScript modules loader while\nattempting an import operation or when loading the program entry point.
import
A callback was called more than once.
A callback is almost always meant to only be called once as the query\ncan either be fulfilled or rejected but not both at the same time. The latter\nwould be possible by calling a callback more than once.
While using Node-API, a constructor passed was not a function.
Node-API
While calling napi_create_dataview(), a given offset was outside the bounds\nof the dataview or offset + length was larger than a length of given buffer.
napi_create_dataview()
offset + length
buffer
While calling napi_create_typedarray(), the provided offset was not a\nmultiple of the element size.
napi_create_typedarray()
While calling napi_create_typedarray(), (length * size_of_element) + byte_offset was larger than the length of given buffer.
(length * size_of_element) + byte_offset
An error occurred while invoking the JavaScript portion of the thread-safe\nfunction.
An error occurred while attempting to retrieve the JavaScript undefined\nvalue.
undefined
On the main thread, values are removed from the queue associated with the\nthread-safe function in an idle loop. This error indicates that an error\nhas occurred when attempting to start the loop.
Once no more items are left in the queue, the idle loop must be suspended. This\nerror indicates that the idle loop has failed to stop.
An attempt was made to use operations that can only be used when building\nV8 startup snapshot even though Node.js isn't building one.
An attempt was made to use crypto features while Node.js was not compiled with\nOpenSSL crypto support.
An attempt was made to use features that require ICU, but Node.js was not\ncompiled with ICU support.
A non-context-aware native addon was loaded in a process that disallows them.
A given value is out of the accepted range.
The package.json \"imports\" field does not define the given internal\npackage specifier mapping.
\"imports\"
The package.json \"exports\" field does not export the requested subpath.\nBecause exports are encapsulated, private internal modules that are not exported\ncannot be imported through the package resolution, unless using an absolute URL.
When strict set to true, thrown by util.parseArgs() if a <boolean>\nvalue is provided for an option of type <string>, or if a <string>\nvalue is provided for an option of type <boolean>.
strict
util.parseArgs()
Thrown by util.parseArgs(), when a positional argument is provided and\nallowPositionals is set to false.
allowPositionals
false
When strict set to true, thrown by util.parseArgs() if an argument\nis not configured in options.
options
An invalid timestamp value was provided for a performance mark or measure.
Invalid options were provided for a performance measure.
Accessing Object.prototype.__proto__ has been forbidden using\n--disable-proto=throw. Object.getPrototypeOf and\nObject.setPrototypeOf should be used to get and set the prototype of an\nobject.
Object.prototype.__proto__
--disable-proto=throw
Object.getPrototypeOf
Object.setPrototypeOf
An attempt was made to require() an ES Module.
require()
Script execution was interrupted by SIGINT (For\nexample, Ctrl+C was pressed.)
Script execution timed out, possibly due to bugs in the script being executed.
The server.listen() method was called while a net.Server was already\nlistening. This applies to all instances of net.Server, including HTTP, HTTPS,\nand HTTP/2 Server instances.
server.listen()
net.Server
Server
The server.close() method was called when a net.Server was not\nrunning. This applies to all instances of net.Server, including HTTP, HTTPS,\nand HTTP/2 Server instances.
server.close()
An attempt was made to bind a socket that has already been bound.
An invalid (negative) size was passed for either the recvBufferSize or\nsendBufferSize options in dgram.createSocket().
recvBufferSize
sendBufferSize
dgram.createSocket()
An API function expecting a port >= 0 and < 65536 received an invalid value.
An API function expecting a socket type (udp4 or udp6) received an invalid\nvalue.
udp4
udp6
While using dgram.createSocket(), the size of the receive or send Buffer\ncould not be determined.
An attempt was made to operate on an already closed socket.
A dgram.connect() call was made on an already connected socket.
dgram.connect()
A dgram.disconnect() or dgram.remoteAddress() call was made on a\ndisconnected socket.
dgram.disconnect()
dgram.remoteAddress()
A call was made and the UDP subsystem was not running.
A string was provided for a Subresource Integrity check, but was unable to be\nparsed. Check the format of integrity attributes by looking at the\nSubresource Integrity specification.
A stream method was called that cannot complete because the stream was\nfinished.
An attempt was made to call stream.pipe() on a Writable stream.
stream.pipe()
Writable
A stream method was called that cannot complete because the stream was\ndestroyed using stream.destroy().
stream.destroy()
An attempt was made to call stream.write() with a null chunk.
stream.write()
An error returned by stream.finished() and stream.pipeline(), when a stream\nor a pipeline ends non gracefully with no explicit error.
stream.finished()
stream.pipeline()
An attempt was made to call stream.push() after a null(EOF) had been\npushed to the stream.
stream.push()
An attempt was made to call stream.unshift() after the 'end' event was\nemitted.
stream.unshift()
'end'
Prevents an abort if a string decoder was set on the Socket or if the decoder\nis in objectMode.
objectMode
const Socket = require('node:net').Socket;\nconst instance = new Socket();\n\ninstance.setEncoding('utf8');\n
An attempt was made to call stream.write() after stream.end() has been\ncalled.
stream.end()
An attempt has been made to create a string longer than the maximum allowed\nlength.
An artificial error object used to capture the call stack for diagnostic\nreports.
An unspecified or non-specific system error has occurred within the Node.js\nprocess. The error object will have an err.info object property with\nadditional details.
err.info
This error represents a failed test. Additional information about the failure\nis available via the cause property. The failureType property specifies\nwhat the test was doing when the failure occurred.
failureType
This error is thrown by checkServerIdentity if a user-supplied\nsubjectaltname property violates encoding rules. Certificate objects produced\nby Node.js itself always comply with encoding rules and will never cause\nthis error.
checkServerIdentity
subjectaltname
While using TLS, the host name/IP of the peer did not match any of the\nsubjectAltNames in its certificate.
subjectAltNames
While using TLS, the parameter offered for the Diffie-Hellman (DH)\nkey-agreement protocol is too small. By default, the key length must be greater\nthan or equal to 1024 bits to avoid vulnerabilities, even though it is strongly\nrecommended to use 2048 bits or larger for stronger security.
DH
A TLS/SSL handshake timed out. In this case, the server must also abort the\nconnection.
The context must be a SecureContext.
SecureContext
The specified secureProtocol method is invalid. It is either unknown, or\ndisabled because it is insecure.
secureProtocol
Valid TLS protocol versions are 'TLSv1', 'TLSv1.1', or 'TLSv1.2'.
'TLSv1'
'TLSv1.1'
'TLSv1.2'
The TLS socket must be connected and securely established. Ensure the 'secure'\nevent is emitted before continuing.
Attempting to set a TLS protocol minVersion or maxVersion conflicts with an\nattempt to set the secureProtocol explicitly. Use one mechanism or the other.
minVersion
maxVersion
Failed to set PSK identity hint. Hint may be too long.
An attempt was made to renegotiate TLS on a socket instance with TLS disabled.
While using TLS, the server.addContext() method was called without providing\na host name in the first parameter.
server.addContext()
An excessive amount of TLS renegotiations is detected, which is a potential\nvector for denial-of-service attacks.
An attempt was made to issue Server Name Indication from a TLS server-side\nsocket, which is only valid from a client.
The trace_events.createTracing() method requires at least one trace event\ncategory.
trace_events.createTracing()
The node:trace_events module could not be loaded because Node.js was compiled\nwith the --without-v8-platform flag.
node:trace_events
--without-v8-platform
A Transform stream finished while it was still transforming.
Transform
A Transform stream finished with data still in the write buffer.
The initialization of a TTY failed due to a system error.
Function was called within a process.on('exit') handler that shouldn't be\ncalled within process.on('exit') handler.
process.on('exit')
process.setUncaughtExceptionCaptureCallback() was called twice,\nwithout first resetting the callback to null.
This error is designed to prevent accidentally overwriting a callback registered\nfrom another module.
A string that contained unescaped characters was received.
An unhandled error occurred (for instance, when an 'error' event is emitted\nby an EventEmitter but an 'error' handler is not registered).
Used to identify a specific kind of internal Node.js error that should not\ntypically be triggered by user code. Instances of this error point to an\ninternal bug within the Node.js binary itself.
A Unix group or user identifier that does not exist was passed.
An invalid or unknown encoding option was passed to an API.
An attempt was made to load a module with an unknown or unsupported file\nextension.
An attempt was made to load a module with an unknown or unsupported format.
An invalid or unknown process signal was passed to an API expecting a valid\nsignal (such as subprocess.kill()).
subprocess.kill()
import a directory URL is unsupported. Instead,\nself-reference a package using its name and define a custom subpath in\nthe \"exports\" field of the package.json file.
import './'; // unsupported\nimport './index.js'; // supported\nimport 'package-name'; // supported\n
import with URL schemes other than file and data is unsupported.
file
data
While using the Performance Timing API (perf_hooks), no valid performance\nentry types are found.
A dynamic import callback was not specified.
The module attempted to be linked is not eligible for linking, because of one of\nthe following reasons:
linkingStatus
'linked'
'linking'
'errored'
The cachedData option passed to a module constructor is invalid.
cachedData
Cached data cannot be created for modules which have already been evaluated.
The module being returned from the linker function is from a different context\nthan the parent module. Linked modules must share the same context.
The module was unable to be linked due to a failure.
The fulfilled value of a linking promise is not a vm.Module object.
vm.Module
The current module's status does not allow for this operation. The specific\nmeaning of the error depends on the specific function.
The WASI instance has already started.
The WASI instance has not been started.
The Worker initialization failed.
Worker
The execArgv option passed to the Worker constructor contains\ninvalid flags.
execArgv
An operation failed because the Worker instance is not currently running.
The Worker instance terminated because it reached its memory limit.
The path for the main script of a worker is neither an absolute path\nnor a relative path starting with ./ or ../.
./
../
All attempts at serializing an uncaught exception from a worker thread failed.
The requested functionality is not supported in worker threads.
Creation of a zlib object failed due to incorrect configuration.
zlib
Too much HTTP header data was received. In order to protect against malicious or\nmalconfigured clients, if more than 8 KiB of HTTP header data is received then\nHTTP parsing will abort without a request or response object being created, and\nan Error with this code will be emitted.
Server is sending both a Content-Length header and Transfer-Encoding: chunked.
Content-Length
Transfer-Encoding: chunked
Transfer-Encoding: chunked allows the server to maintain an HTTP persistent\nconnection for dynamically generated content.\nIn this case, the Content-Length HTTP header cannot be used.
Use Content-Length or Transfer-Encoding: chunked.
A module file could not be resolved by the CommonJS modules loader while\nattempting a require() operation or when loading the program entry point.
The value passed to postMessage() contained an object that is not supported\nfor transferring.
The UTF-16 encoding was used with hash.digest(). While the\nhash.digest() method does allow an encoding argument to be passed in,\ncausing the method to return a string rather than a Buffer, the UTF-16\nencoding (e.g. ucs or utf16le) is not supported.
encoding
ucs
utf16le
Used when a failure occurs sending an individual frame on the HTTP/2\nsession.
Used when an HTTP/2 Headers Object is expected.
Used when a required header is missing in an HTTP/2 message.
HTTP/2 informational headers must only be sent prior to calling the\nHttp2Stream.prototype.respond() method.
Http2Stream.prototype.respond()
Used when an action has been performed on an HTTP/2 Stream that has already\nbeen closed.
Used when an invalid character is found in an HTTP response status message\n(reason phrase).
A given index was out of the accepted range (e.g. negative offsets).
An invalid or unexpected value was passed in an options object.
An invalid or unknown file encoding was passed.
This error code was replaced by ERR_MISSING_TRANSFERABLE_IN_TRANSFER_LIST\nin Node.js v15.0.0, because it is no longer accurate as other types of\ntransferable objects also exist now.
ERR_MISSING_TRANSFERABLE_IN_TRANSFER_LIST
Used by the Node-API when Constructor.prototype is not an object.
Constructor.prototype
Response was received but was invalid when importing a module over the network.
A network module attempted to load another module that it is not allowed to\nload. Likely this restriction is for security reasons.
A Node.js API was called in an unsupported manner, such as\nBuffer.write(string, encoding, offset[, length]).
Buffer.write(string, encoding, offset[, length])
An operation failed. This is typically used to signal the general failure\nof an asynchronous operation.
Used generically to identify that an operation caused an out of memory\ncondition.
The node:repl module was unable to parse data from the REPL history file.
node:repl
Data could not be sent on a socket.
An attempt was made to close the process.stderr stream. By design, Node.js\ndoes not allow stdout or stderr streams to be closed by user code.
process.stderr
An attempt was made to close the process.stdout stream. By design, Node.js\ndoes not allow stdout or stderr streams to be closed by user code.
process.stdout
Used when an attempt is made to use a readable stream that has not implemented\nreadable._read().
readable._read()
Used when a TLS renegotiation request has failed in a non-specific way.
A SharedArrayBuffer whose memory is not managed by the JavaScript engine\nor by Node.js was encountered during serialization. Such a SharedArrayBuffer\ncannot be serialized.
SharedArrayBuffer
This can only happen when native addons create SharedArrayBuffers in\n\"externalized\" mode, or put existing SharedArrayBuffer into externalized mode.
An attempt was made to launch a Node.js process with an unknown stdin file\ntype. This error is usually an indication of a bug within Node.js itself,\nalthough it is possible for user code to trigger it.
stdin
An attempt was made to launch a Node.js process with an unknown stdout or\nstderr file type. This error is usually an indication of a bug within Node.js\nitself, although it is possible for user code to trigger it.
The V8 BreakIterator API was used but the full ICU data set is not installed.
BreakIterator
Used when a given value is out of the accepted range.
The module must be successfully linked before instantiation.
The linker function returned a module for which linking has failed.
The pathname used for the main script of a worker has an\nunknown file extension.
Used when an attempt is made to use a zlib object after it has already been\nclosed.
The native call from process.cpuUsage could not be processed.
process.cpuUsage