Error AtlasError Documentation and Resolution

JavaScript could not convert a non-integer value to BigInt

RangeError: x can't be converted to BigInt because it isn't an integer

JavaScript rejected a conversion to BigInt because the source numeric value is not an integer.

RangeError: x can't be converted to BigInt because it isn't an integerruntime
RangeError: x can't be converted to BigInt because it isn't an integer
  • A decimal number is being converted to BigInt.
  • Parsed or computed numeric input contains a fractional component.
  • Type conversion assumptions ignore BigInt's integer-only rules.
  1. Convert only integers to BigInt.
  2. Round, floor, or reject decimal values before conversion as appropriate.
  3. Validate parsed numeric input before calling BigInt or related APIs.
MDN: RangeError: x can't be converted to BigInt because it isn't an integer
JavaScript can't be converted to BigInt because it isn't an integer | Error Atlas