Web3.js: Errors on Install (Its falling back to the pure JS implementation of keccak and secp256k1)

Created on 23 Oct 2019  路  2Comments  路  Source: ChainSafe/web3.js

Brand new computer, installing web3, got some errors (failures)...

Is my installation usable?

npm i web3
...
...
5 errors generated.
make: *** [Release/obj.target/keccak/src/addon.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:196:23)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 19.0.0
gyp ERR! command "/usr/local/Cellar/node/12.12.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/smith/P1/node_modules/keccak
gyp ERR! node -v v12.12.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] rebuild: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] rebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/smith/.npm/_logs/2019-10-23T11_25_13_207Z-debug.log
Keccak bindings compilation fail. Pure JS implementation will be used.
...

The module appears to have installed, but those errors look pretty bad. Is my installation ok to use?

my details:

$ node -v ; npm -v ; uname -a
v12.12.0
6.11.3
Darwin MacBook-Pro.local 19.0.0 Darwin Kernel Version 19.0.0: Wed Sep 25 20:18:50 PDT 2019; root:xnu-6153.11.26~2/RELEASE_X86_64 x86_64
1.x dependencies

Most helpful comment

Thanks for opening this issue! Yes, your installation is safe to use. The ethereumjs-util package does still have a dependency on node-gyp which occurs this error above. But as you can see is it falling back to a pure JavaScript implementation for keccak: Keccak bindings compilation fail. Pure JS implementation will be used.. We will improve this asap.

keccak issue
secp256k1 issue

All 2 comments

Thanks for opening this issue! Yes, your installation is safe to use. The ethereumjs-util package does still have a dependency on node-gyp which occurs this error above. But as you can see is it falling back to a pure JavaScript implementation for keccak: Keccak bindings compilation fail. Pure JS implementation will be used.. We will improve this asap.

keccak issue
secp256k1 issue

It is now possible to install web3.js on the latest version of nodejs as expected. Thanks to @evertonfraga for publishing the required fixes in the dependencies we use.

Was this page helpful?
0 / 5 - 0 ratings