indutny / bn.js

BigNum in pure javascript
MIT License
1.19k stars 150 forks source link

TypeError: bn_js_1.default is not a constructor #286

Closed ubaidillahhf closed 2 years ago

ubaidillahhf commented 2 years ago

Just got error when implement class validator DTO

@Transform(({ value }) => new BN(value.toString()))

and i got error: TypeError: bn_js_1.default is not a constructor at Object.transformFn

anyone can help me? there is something wrong? below in my package.json. Thanks "@types/bn.js": "^5.1.0", "bn.js": "^5.2.0"