Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG,BigNumber is not a constructor #52

Open
lostimever opened this issue Apr 7, 2021 · 4 comments
Open

BUG,BigNumber is not a constructor #52

lostimever opened this issue Apr 7, 2021 · 4 comments

Comments

@lostimever
Copy link

lostimever commented Apr 7, 2021

environment :vue3+vite+element-plus
when used 🔢:

import JSONbig from 'json-bigint'

let json = '{ "value" : 9223372036854775807, "v2": 123 }'
let r1 = JSONbig.parse(json)
console.log('JSONbig.parse(input).value : ', r1.value.toString())

ERROR!
like this:

 TypeError: BigNumber is not a constructor
@WandersonAlves
Copy link

Used in typescript backend, bundled with webpack:

import { parse as JSONBigIntParse } from 'json-bigint'; // import * as JSONBitInt from 'json-bigint' fails too

const parsedRespons: ReqResp = JSONBigIntParse(data as unknown as string);

Results in:

TypeError: r is not a constructor

@ZQ-jhon
Copy link

ZQ-jhon commented Jul 9, 2021

same here.

@perrin4869
Copy link

I'm getting an error, TypeError: Right-hand side of 'instanceof' is not callable here
I think this is the same problem as in this issue
My app is bundled with rollup
Maybe later I will try a minimal reproduction

@yzx9
Copy link

yzx9 commented Feb 23, 2022

I think those issues all related with #34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants