Error Code Portal
Node.jsNode.jsError code

ERR_INVALID_RETURN_VALUE

invalid return value

Code ERR_INVALID_RETURN_VALUE · An issue reported by Node.js.

Thrown in case a function option does not return an expected value type on execution, such as when a function is expected to return a promise.

Troubleshooting and diagnostic links

First check that the document's product, version, and environment match your situation.