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

  1. Clamp or validate the value before passing it.
  2. Consult the API documentation for the valid range.
  3. 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.