PostHog / posthog-js

Send usage data from your web app or site to PostHog, with autocapture.
https://posthog.com/docs/libraries/js
Other
299 stars 125 forks source link

BigInt serialization error in encodePostData #1440

Open zimrain opened 1 month ago

zimrain commented 1 month ago

Our React app uses BigInt in many places. Only autocapture is on, no custom events. We're getting the following: "TypeError: Do not know how to serialize a BigInt"

Source map points back to JSON.stringify call in encodePostData here: https://github.com/PostHog/posthog-js/blob/26150b197dc1a2f5241b8d29ee7a359331a1a0a4/src/request.ts#L48