-
Notifications
You must be signed in to change notification settings - Fork 5k
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
TypeError: Cannot convert a BigInt value to a number #6187
Comments
Thanks @eliashezron for opening an issue. However, in order to help you, we need the code that caused the error. And it will be great if you could make it available at some cloud IDE like https://codesandbox.io/. Thanks, |
so I am trying to create an chrome extension, I create a reactapp and the add web3 package to the app, Then call a function to get the balance of an address, Build and deploy. Thats where the error comes from. try it out here |
Same problem, I just set version to 1.9.0, solved this problem. @eliashezron |
@eliashezron Hi!
|
This solution worked for me. Thank you @valentin-uskov |
@eliashezron , indeed @valentin-uskov is a life saver! Thanks |
@valentin-uskov |
Fkkk. You saved my life. Thanks. |
Thanks all for your shared findings. |
Thank you very much, wasn't able to fix this bug for days. You are a lifesaver! |
Per 9/5 meeting, need to investigate. |
Thanks man, I've been on this for daysss Finally, your solution helped me |
also , if you're using web3.js on the baackend, say a nodejs app, use module |
this solve my problem too!! Even I'm in other similar situation! thx. |
Hi all, However, we will try to overcome this by avoid using |
The code has been modified so this issue should not be present once the next release takes a place. If anyone still face this issue, one of the following should resolve it:
However, if one of the above did not solve your issue. Please provide the full details and steps to replicate the case. And preferably provide your code at a cloude IDE. |
Expected behavior
view screen on deployment
Actual behavior
failing to view screen on deployment because of the error, This is the error
TypeError: Cannot convert a BigInt value to a number
that seems to be coming from theconverter.ts
file. line40
in the screenshot belowSteps to reproduce the behavior
create-react-app
install the lastest web3 package
yarn add web3
build the project
deploy to netlify or vercel
Logs
Environment
npm
9.6.2
node
v18.15.0
web3js
v4.0.1
OS
macOS
device
macbook
The text was updated successfully, but these errors were encountered: