6

The version of web3 in Truffle v4.0.5 is v0.20.3. Is it possible to manually upgrade the web3 version?


Similar to this question about web3 in geth. (It's hardcoded.)

Somewhat relevant to this issue.

1 Answer 1

9

Found this workaround. You can manually load a different version by loading it yourself:

First install some version:

npm install [email protected]

Then load it into the truffle console:

var Web3latest = require('web3');
var web3latest = new Web3latest();
1
  • I know this is old, but, for me (and others I've seen online), this results in an error that the provider is not set.
    – Totem
    Feb 10, 2021 at 17:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.