Error code
Node.js ERR_UNESCAPED_CHARACTERS
NODE.JSERR_UNESCAPED_CHARACTERS
Runtime Error Code· An error code from a programming runtime or package manager, like Node.js or npm.
What it means
A URL or path string contains characters that must be percent-encoded but were passed unescaped.
How to fix it
- Encode the URL with encodeURIComponent or encodeURI before passing it.
- Use the WHATWG URL API (new URL()) to build URLs safely.
- Check query string values for special characters before appending them to a URL.
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