radixdlt/radixdlt-js

bn.js has no default export

Closed this issue · 2 comments

Getting following error when compiling typescript.
version: 1.0.2-alpha

/radixdlt/radix/node_modules/radixdlt/build/module/modules/common/RadixEUID.d.ts
(3,8): Module '"/radixdlt/radix/node_modules/@types/bn.js/index"' has no default export.

Hi @xstelea, can you give me more details about the way you're trying to compile the library? If you just want to use the library you could add it with npm or yarn and avoid the compilation step https://github.com/radixdlt/radixdlt-js#installation.

The error you mention usually happens when allowSyntheticDefaultImports is disabled in the tsconfig.json file. Make sure this line is there:

"allowSyntheticDefaultImports": true

Also in case you're compiling it yourself use node v10+.

Let me know how it goes!

Closed since this library is now deprecated.