Skip to content

web3 installation

Vsevolod Trofimov edited this page Jul 4, 2018 · 12 revisions

This guide is assuming that you have tried to npm install web3 and it didn't work


Most of the time this is device-specific issue, due to web3 using c++ and python to build itself in postinstall time. If you have trouble with EACCES even with sudo it's #2 in UNIX section.

Windows

1

Install https://www.npmjs.com/package/windows-build-tools and try again

It will need admin rights and might take a while to install

2

If you are getting ENIVAL invalid argument read consider using yarn.

npm i -g yarn
yarn add web3

UNIX

1

Make sure you have git, gcc and python installed

2

There is an issue with npm not passing sudo rights to the postinstall script. Try installing using yarn.

npm i -g yarn
sudo yarn add web3

Other issues.

If that didn't help check out https://github.com/ethereum/web3.js/issues/950.

Clone this wiki locally