Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Hot answers tagged

5

This web3 version is a few years old you should probably use a new one. Make sure to update!


3

Get the contract object via: const contract = await new web3.eth.Contract(JSON.parse(interface), smartContractAddress);


2

There is an alternative method. You can download ganache from the below link $https://github.com/trufflesuite/ganache/releases/download/v1.2.2/ganache-1.2.2-x86_64.AppImage After it has downloaded execute the below command in terminal $cd Downloads $sudo chmod a+x ganache-1.2.2-x86_64.AppImage Now search for ganache and double click on it and press yes ...


2

Your version of Python does not match the required version for one of the dependencies. To explain your error in more detail, Python is not compiled, so version mismatch is found at run-time. The program is using the old Python 2.7 print syntax which is flagging the error. By installing the appropriate version of Python 2.7 or upgrading to a version of the ...


1

I am expecting that you already executed npm init at first. I assume you are using windows? I always develop blockchain related stuff on Ubuntu. Here is what you need to do on windows to set it up properly. Step 1: npm install -g --production windows-build-tools Step 2: npm install -g node-gyp Now it should work! If you still have a problem make sure ...


1

If using a recent web3 (e.g. 1.0.0-beta.50), a possible remedy is to set esModuleInterop: { "compilerOptions": { "esModuleInterop": true } } See also: https://github.com/ethereum-ts/TypeChain/blob/5b4f397c64b7d32cdf2ce50062f69bad324efa99/test/integration/targets/web3-1.0.0/


1

I guess it is not compatible with node 12.x I managed to install it with node 10.16.0 I also had to install the following to solve some error messages: sudo apt-get install libgconf-2-4 sudo apt install libcanberra-gtk-module libcanberra-gtk3-module


1

uninstall / reinstall node (deleted all related folders in local directories too, including in Roaming) in POWERSHELL as Administrator: npm install --global --production windows-build-tools npm install --save --no-optional web3. Hope this works for you.


1

Not sure (because you didn't provide full error logs), but I think the problem is with some build-tools, installing it will solve your problem. npm install -g windows-build-tools Note: Make sure that you install windows-build-tools globally.


Only top voted, non community-wiki answers of a minimum length are eligible