apache / apache/pouchdb

PouchDB can't store BigInt

Open
#8,566 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
17.6k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

### Issue

PouchDB can't store a document containing BigInt.

The error is:
```
TypeError: Do not know how to serialize a BigInt
at JSON.stringify ()
at rev$$1 (C:\Users\xxx\node_modules\pouchdb\lib\index.js:944:25)
```

### Info
- Environment: Node.js
- Platform: Windows 10
- Adapter: leveldb
- Server: PouchDB local (no server)

### Reproduce
Try to store a document with a BigInt in it.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.