Error AtlasError Documentation and Resolution

JavaScript mixed BigInt and Number in an unsupported way

TypeError: can't convert BigInt to number

JavaScript rejected an operation because BigInt and Number values were mixed in a context that requires explicit conversion.

TypeError: can't convert BigInt to numberruntime
TypeError: can't convert BigInt to number
  • BigInt and Number values were mixed in one arithmetic expression.
  • An API expects Number values but received BigInt.
  • Implicit conversion was assumed where JavaScript requires explicit conversion.
  1. Convert values explicitly before combining BigInt and Number types.
  2. Choose one numeric representation for the operation where possible.
  3. Review library and API expectations for accepted numeric types.
MDN: TypeError: can't convert BigInt to number
JavaScript can't convert BigInt to number: causes and fixes | Error Atlas