Error code

Node.js ERR_INVALID_ARG_VALUE

NODE.JSERR_INVALID_ARG_VALUE
Runtime Error Code· An error code from a programming runtime or package manager, like Node.js or npm.

What it means

A function argument has a valid type but an invalid or out-of-range value.

How to fix it

  1. Check the allowed value range in the Node.js documentation.
  2. Validate the value before passing it to the API.
  3. Add a guard condition or clamp the value to an acceptable range.

Not affiliated with Node.js. Answer summarized from the manufacturer's manual linked above; consult that source for the authoritative procedure.