Web3.js: Typescript compilation error regarding a bignumber.js import

Created on 22 Feb 2020  路  4Comments  路  Source: ChainSafe/web3.js

Expected behavior

Build web3 with typescript without errors

Actual behavior

node_modules/web3-core/types/index.d.ts(31,23): error TS2307: Cannot find module 'bignumber.js'.
node_modules/web3-eth/types/index.d.ts(51,25): error TS2307: Cannot find module 'bignumber.js'.

see this Github Action to reproduce, logs, and configuration
https://github.com/dapplion/web3-tsc-test/runs/461815145

1.x bug dependencies types

All 4 comments

@dapplion Thanks for reporting. Have opened #3390 to resolve this.

An interim fix is to install bignumber.js as a dependency in your project.

Thanks for pushing a fix fast. Adding bignumber.js as a direct dependency also fixed the problem in my case.

Fixed by #3390

Re-opening for visibility until 1.2.7 is published.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zamoore picture zamoore  路  3Comments

oktapodia picture oktapodia  路  3Comments

FradSer picture FradSer  路  3Comments

sundbry picture sundbry  路  3Comments

SCBuergel picture SCBuergel  路  3Comments