question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npm install sha3 fails - node10/npm6

See original GitHub issue

Traceback:

sha3@1.2.0 install /Users/noahzinsmeister/Documents/github/smart-contracts/snowflake_poc/node_modules/sha3 node-gyp rebuild

CXX(target) Release/obj.target/sha3/src/addon.o …/src/addon.cpp:59:36: error: no matching member function for call to ‘NewInstance’ info.GetReturnValue().Set(cons->NewInstance(argc, argv)); ^~~~~ /Users/noahzinsmeister/.node-gyp/10.0.0/include/node/v8.h:3851:44: note: candidate function not viable: requires single argument ‘context’, but 2 arguments were provided V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance( ^ /Users/noahzinsmeister/.node-gyp/10.0.0/include/node/v8.h:3848:44: note: candidate function not viable: requires 3 arguments, but 2 were provided V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance( ^ 1 error generated. make: *** [Release/obj.target/sha3/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:258:23) gyp ERR! stack at ChildProcess.emit (events.js:182:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:225:12) gyp ERR! System Darwin 17.5.0 gyp ERR! command “/usr/local/Cellar/node/10.0.0/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild” gyp ERR! cwd /Users/noahzinsmeister/Documents/github/smart-contracts/snowflake_poc/node_modules/sha3 gyp ERR! node -v v10.0.0 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:17
  • Comments:27

github_iconTop GitHub Comments

22reactions
canterberrycommented, Apr 29, 2018

@bladexxv Since this issue doesn’t manifest until Node.js 10.x, a workaround would be to downgrade to Node.js 9.11.1 (the previous non-LTS release) or 8.11.1 (the current LTS release).

The minimum path to fixing this issue altogether in Node.js 10.x would be:

  1. A maintainer of this repo would need to merge #33.
  2. A maintainer of this repo would need to increment the version number and tag a new release.
  3. A maintainer with access to publish the sha3 package to npm would need to publish the new patch version to npm.
  4. Direct dependencies on this project would need to be updated to (a) specify the new version, and/or (b) update the lockfile to specify the new patch version.
4reactions
Juan-cccommented, Jul 24, 2019

I followed @canterberry steps, but it didn’t work in my case unfortunately. I was forced to downgrade node to 11.13.0

Steps I followed to downgrade from node 12 to 11:

  1. sudo npm install -g n install a program called n
  2. sudo n 11.13.0 downgrading node to 11.13.0
  3. rm -fR node_modules cleaning dependencies
  4. npm install reinstall dependencies

BTW - I am on mac

Read more comments on GitHub >

github_iconTop Results From Across the Web

sha3
Start using sha3 in your project by running `npm i sha3`. There are 309 other projects in the npm registry using sha3.
Read more >
Compiling Error with sha3 & Ethereum Mist
Faced the same problem when trying to install a truffle box. There is an issue with installing the sha3 dependency.
Read more >
Can't compile npm module node-sha3 using node.js 10.2
Pipelines - Run Failures ... It compiles fine on 10.2 on OS X, but fails on bitbucket ... Failed at the sha3@1.2.2 install...
Read more >
pysha3
SHA-3 (Keccak) for Python 2.7 - 3.5. ... Add workaround for alignment error on 64bit SPARC machine by using the opt32 implementation.
Read more >
SHA3 Sum - Kevin FOO - Medium
Assuming you already have npm installed in your Ubuntu 20.04. You'll need to install SHA3 package with the following command. Now to test...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found