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

Typescript compilation error regarding a bignumber.js import #3386

Closed
dapplion opened this issue Feb 22, 2020 · 4 comments · Fixed by #3390
Closed

Typescript compilation error regarding a bignumber.js import #3386

dapplion opened this issue Feb 22, 2020 · 4 comments · Fixed by #3390
Labels
1.x 1.0 related issues Bug Addressing a bug Types Incorrect or missing types

Comments

@dapplion
Copy link

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

@cgewecke
Copy link
Collaborator

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

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

@cgewecke cgewecke added 1.x 1.0 related issues dependencies Types Incorrect or missing types Bug Addressing a bug labels Feb 24, 2020
@dapplion
Copy link
Author

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

@holgerd77
Copy link
Collaborator

Fixed by #3390

@cgewecke
Copy link
Collaborator

Re-opening for visibility until 1.2.7 is published.

@cgewecke cgewecke reopened this Mar 16, 2020
meck93 added a commit to alexscheitlin/master-project-evoting that referenced this issue Apr 8, 2020
- sealer & voting-authority backend -> need bignumber.js as dev dependency due to web3js bug: web3/web3.js#3386
- remove all .npmrc files (no longer needed, @meck93/evote-crypto is a public npm package)
- remove github.json and reading github config from most build scripts since it's no longer needed
meck93 added a commit to alexscheitlin/master-project-evoting that referenced this issue Apr 8, 2020
- sealer & voting-authority backend -> need bignumber.js as dev dependency due to web3js bug: web3/web3.js#3386
- remove all .npmrc files (no longer needed, @meck93/evote-crypto is a public npm package)
- remove github.json and reading github config from most build scripts since it's no longer needed
@ryanio ryanio mentioned this issue Apr 15, 2020
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x 1.0 related issues Bug Addressing a bug Types Incorrect or missing types
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants