Error code
Node.js ERR_OUT_OF_RANGE
NODE.JSERR_OUT_OF_RANGE
Runtime Error Code· An error code from a programming runtime or package manager, like Node.js or npm.
What it means
A numeric argument is outside the permissible range for that API.
How to fix it
- Clamp or validate the value before passing it.
- Consult the API documentation for the valid range.
- Use Math.min or Math.max to keep values in bounds.
Not affiliated with Node.js. Answer summarized from the manufacturer's manual linked above; consult that source for the authoritative procedure.
More Node.js codes
- ERR_BUFFER_OUT_OF_BOUNDSAn offset or length value provided to a Buffer method falls outside the buffer's boundaries
- ERR_DLOPEN_FAILEDNode.js failed to load a native addon (.node file) using dlopen/LoadLibrary
- ERR_FS_FILE_TOO_LARGEThe file is larger than the maximum size that can be read into memory by fs.readFile
- ERR_HTTP_HEADERS_SENTAn attempt was made to set or send HTTP response headers after the response has already been sent
- ERR_INTERNAL_ASSERTIONAn internal Node.js assertion failed — this indicates a bug in Node.js itself
- ERR_INVALID_ARG_TYPEA function was called with an argument of the wrong type
- ERR_INVALID_ARG_VALUEA function argument has a valid type but an invalid or out-of-range value
- ERR_INVALID_FILE_URL_PATHA file: URL has a path that is invalid on the current operating system
- ERR_INVALID_MODULE_SPECIFIERThe module specifier string passed to import() or require() is not a valid module identifier
- ERR_INVALID_PACKAGE_CONFIGThe package.json file for a module is malformed and cannot be parsed
- ERR_INVALID_PACKAGE_TARGETThe target in the package.json exports or imports map is invalid
- ERR_INVALID_RETURN_VALUEA hook or callback returned a value of the wrong type