Node.js documented errors
Browse Node.js error messages, error codes, troubleshooting explanations, and practical fixes with exact wording and search-friendly reference pages.
This Node.js error reference is designed for users searching exact Node.js error messages, error codes, and clear how-to-fix guidance.
Node.js users often search exact error messages and error codes rather than general documentation topics, so this hub is written to support copied-message search as well as product browsing.
Each Node.js entry focuses on what the error means, why it happens, and what to check next so the page is useful both from search engines and from internal navigation.
Filesystem
Filesystem errors
ENOENTNode.js could not find the requested file or directoryNode.js tried to access a path that does not exist at the time of the operation.
ENOTDIRNode.js expected a directory but found a file path insteadNode.js attempted to traverse or open a path as a directory, but one of the path segments is not actually a folder.
EISDIRNode.js expected a file but received a directory pathEISDIR means a filesystem operation received a directory where it needed a file. Start with the error's path and syscall: reinstalling packages or changing permissions will not correct a path pointing at the wrong type of object.
EEXISTNode.js tried to create a file or directory that already existsNode.js attempted an operation that requires a path not to exist yet, but that file or directory was already present.
Http
Http errors
Memory
Memory errors
Modules
Modules errors
ERR_PACKAGE_PATH_NOT_EXPORTEDNode.js blocked access to a package subpath that is not exportedNode.js found the package, but the requested subpath is not exposed through the package exports field, so the import is blocked.
ERR_UNKNOWN_FILE_EXTENSIONNode.js cannot load an unknown file extensionThe runtime loader does not know how to execute the imported file type. This commonly appears when a source file intended for a compiler, framework, or custom runner is passed directly to Node.
ERR_MODULE_NOT_FOUNDNode.js could not resolve the requested moduleNode.js could not resolve an import or module specifier, usually because the path, package name, export map, or file extension does not match what the runtime expects.
ERR_UNSUPPORTED_DIR_IMPORTNode.js ES module directory import is unsupportedNode's ES module resolver does not automatically load a directory index for a relative import. Code that worked with CommonJS folder resolution can fail after switching to import syntax.
ERR_IMPORT_ATTRIBUTE_MISSINGNode.js JSON import is missing its type attributeAn ES module imports JSON without telling Node which module type to load. Current Node releases require an explicit JSON import attribute; a bundler may accept source that direct Node execution rejects.
ERR_PACKAGE_IMPORT_NOT_DEFINEDNode.js package import alias is not definedA private package import beginning with # cannot be resolved from the current package's imports mapping. The mapping is scoped to that package rather than being a global alias.
ERR_REQUIRE_ASYNC_MODULENode.js require cannot load an asynchronous ES moduleSynchronous require cannot load an ES module graph that uses top-level await. The awaited work may be in a dependency rather than the module named by the caller.
ERR_REQUIRE_ESMNode.js require tried to load an ES moduleNode.js rejected a require() call because the target module is an ES module and the current loading path is not compatible with it.
ERR_UNSUPPORTED_TYPESCRIPT_SYNTAXNode.js type stripping cannot transform TypeScript syntaxNative TypeScript type stripping removes erasable annotations but does not perform every transformation a TypeScript compiler can. Syntax that needs generated JavaScript can fail even when a separate type check succeeds.
Network
Network errors
ECONNREFUSEDNode.js connection was refused by the target serviceNode.js tried to connect to a remote service, but nothing accepted the connection at the target host and port.
ECONNRESETNode.js connection was reset by the peerNode.js was communicating over a socket, but the remote side closed the connection unexpectedly before the exchange completed.
EADDRINUSENode.js could not bind because the address is already in useNode.js could not start a server because another process is already listening on the same host and port combination.
ETIMEDOUTNode.js operation timed out before completionNode.js waited too long for a network or socket operation to complete and the operation timed out.
Networking
Networking errors
Runtime
Runtime errors
EMFILENode.js opened too many files at onceNode.js reached the operating system limit for open file descriptors, which commonly happens during heavy file access or runaway watchers.
EACCESNode.js permission denied while accessing a file or resourceNode.js could not access a file, folder, port, or other resource because the current process does not have the required permissions.
ERR_INVALID_ARG_TYPENode.js received an argument with the wrong typeNode.js threw because an API received a value of the wrong type, such as a string where a Buffer, URL, or function was expected.
ERR_INVALID_ARG_VALUENode.js received an unsupported argument valueNode.js rejected an argument because the value was structurally the right kind of thing, but the content was not valid for that API.