queckezz/koa-views

Undetermined Bigint conversion when debug enabled

boin opened this issue · 1 comments

boin commented

When ctx.state object contains an unserialize type like Bigint, we got an error here.

[ERROR] error - TypeError Do not know how to serialize a BigInt TypeError: Do not know how to serialize a BigInt
at JSON.stringify ()
at tryStringify (internal/util/inspect.js:1551:17)
at formatWithOptions (internal/util/inspect.js:1618:25)
at Object.format (internal/util/inspect.js:1543:10)
at Function.log (/Documents/projects/pay/node_modules/koa-views/node_modules/debug/src/node.js:190:35)
at debug (/Documents/projects/pay/node_modules/koa-views/node_modules/debug/src/common.js:114:10)
at /Documents/projects/pay/node_modules/koa-views/src/index.js:25:9

debug('render `%s` with %j', paths.rel, state)

fixed via v6.2.2