Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm error "Keccak bindings compilation fail." while installing truffle

I tried to install Truffle, but then I got this error:

$ npm install -g truffle
    C:\Users\dany.vandermeij\AppData\Roaming\npm\truffle -> C:\Users\dany.vandermeij\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js

> [email protected] install C:\Users\dany.vandermeij\AppData\Roaming\npm\node_modules\truffle\node_modules\keccak
> npm run rebuild || echo "Keccak bindings compilation fail. Pure JS implementation will be used."


> [email protected] rebuild C:\Users\dany.vandermeij\AppData\Roaming\npm\node_modules\truffle\node_modules\keccak
> node-gyp rebuild


C:\Users\dany.vandermeij\AppData\Roaming\npm\node_modules\truffle\node_modules\keccak>if not defined npm_config_node_gyp (node "C:\Users\dany.vandermeij\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\dany.vandermeij\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\dany.vandermeij\AppData\Local\Programs\Python\Python37-32\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                                ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:275:12)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at maybeClose (internal/child_process.js:925:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\dany.vandermeij\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\dany.vandermeij\AppData\Roaming\npm\node_modules\truffle\node_modules\keccak
gyp ERR! node -v v8.11.4
gyp ERR! node-gyp -v v3.8.0
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 ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\dany.vandermeij\AppData\Roaming\npm-cache\_logs\2019-01-22T09_38_03_836Z-debug.log
"Keccak bindings compilation fail. Pure JS implementation will be used."
+ [email protected]
added 89 packages from 304 contributors and updated 1 package in 14.582s

I tested the truffle commands and they seem to work, but I dont know why I get this error...

(I need some more text here, so here you have a super awesome Hacker Ipsum: Haxx0r ipsum it's a feature client python else packet sniffer epoch socket. Dennis Ritchie stack race condition pwned warez James T. Kirk suitably small values. Gc continue sql packet alloc leapfrog less gcc shell bytes protected.)

Thank you for your help

like image 833
BlockchainProgrammer Avatar asked Jan 24 '19 09:01

BlockchainProgrammer


1 Answers

Use npm install -g truffle --unsafe-perm to install truffle this is probably happening due to a syntax issue of keccak which shouldn't affect functionality.

UPDATE (Windows)

npm install --global windows-build-tools
like image 169
Kalana Demel Avatar answered Nov 17 '22 16:11

Kalana Demel