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 read property 'toWei' of undefined #2328
Comments
yea, I've duplicated this on |
Another detail: It works if you access
Hack workaround: use
It seems that |
The static property utils do no longer exist on the Web3 class. If you would like to use the import * as Utils from 'web3-utils';
// or
import { asciiToHex } from 'web3-utils'; EDIT: I've planned to export all the modules directly from the "web3" NPM package but until then you have to install such a module separately. |
@nivida the following is still in the web3.js 1.0 documentation: utils
probably worth being very careful about updating the docs when there is a breaking change, otherwise you're gonna get a lotta folks submitting issues like this. |
There are similar looking older (2018) versions this problem but it was working fine until recently. Seems to have made a comeback after
v1.0.0-beta.37
Expected behavior
Actual behavior
Steps to reproduce the behavior
See 'Actual behavior'
Error Logs
Thrown: TypeError: Cannot read property 'toWei' of undefined
Versions
web3@1.0.0-beta.41
Darwin nsa-mbp2.local 17.7.0 Darwin Kernel Version 17.7.0: Fri Nov 2 20:43:16 PDT 2018; root:xnu-4570.71.17~1/RELEASE_X86_64 x86_64
v11.9.0
6.5.0
The text was updated successfully, but these errors were encountered: