Not able to install web3 using nodejs

1.4k views Asked by At

I am trying to install web3.js using npm but its failing with the following error.

The error messages are long, I have shared here the first few lines.

C:\Eth>npm install web3 --save
> [email protected] postinstall C:\Eth\node_modules\web3
> lerna bootstrap

lerna info version 2.1.0
lerna info Bootstrapping 19 packages
lerna info lifecycle preinstall
lerna info Installing external dependencies
lerna ERR! execute Error: Command failed: npm install
lerna ERR! execute npm WARN deprecated [email protected]: Please update to 
minimatch 3.0.2 or higher to avoid a RegExp DoS issue
lerna ERR! execute gyp ERR! build error
lerna ERR! execute gyp ERR! stack Error: `msbuild` failed with exit code: 1
lerna ERR! execute gyp ERR! stack     at ChildProcess.onExit (C:\Program 
Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
lerna ERR! execute gyp ERR! stack     at emitTwo (events.js:106:13)
lerna ERR! execute gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
lerna ERR! execute gyp ERR! stack     at Process.ChildProcess._handle.onexit 
(internal/child_process.js:215:12)
lerna ERR! execute gyp ERR! System Windows_NT 10.0.14393
lerna ERR! execute gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" 
"C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-
gyp\\bin\\node-gyp.js" "rebuild"
lerna ERR! execute gyp ERR! cwd C:\Eth\node_modules\web3\packages\web3-eth-
accounts\node_modules\scrypt
lerna ERR! execute gyp ERR! node -v v6.11.2
lerna ERR! execute gyp ERR! node-gyp -v v3.4.0
lerna ERR! execute gyp ERR! not ok
lerna ERR! execute npm WARN web3-eth-accounts No repository field.
lerna ERR! execute npm WARN web3-eth-accounts No license field.
lerna ERR! execute npm ERR! Windows_NT 10.0.14393

Please let me know what might be the issue here.

1

There are 1 answers

0
Geo_Python On

It probably has to do with the new version of web3 1.0, which is currently in beta version. You could try to install the previous version. It worked for me.

npm install [email protected]