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.

Not work with Ethreum web3

See original GitHub issue

Platform: darwin node: v8.0.0 npm: v5.0.0 electron: v1.6.2

I installed the Ethreum web3 module When run electron., it shows:

Error: The module '/Users/Maggie/Documents/RA/FirstElectron/node_modules/scrypt/build/Release/scrypt.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 57. This version of Node.js requires
NODE_MODULE_VERSION 53. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or`npm install`).

Then I installed electron rebuild ./node_modules/.bin/electron-rebuild

I get error message

✖ Rebuild Failed

An unhandled error occurred inside electron-rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@8.0.0 | darwin | x64
gyp info spawn /usr/local/bin/python2
gyp info spawn args [ '/Users/Maggie/Documents/RA/FirstElectron/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/Maggie/Documents/RA/FirstElectron/node_modules/ed25519/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/Maggie/Documents/RA/FirstElectron/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/Maggie/.electron-gyp/.node-gyp/iojs-1.6.15/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/Maggie/.electron-gyp/.node-gyp/iojs-1.6.15',
gyp info spawn args   '-Dnode_gyp_dir=/Users/Maggie/Documents/RA/FirstElectron/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/Maggie/.electron-gyp/.node-gyp/iojs-1.6.15/<(target_arch)/iojs.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/Maggie/Documents/RA/FirstElectron/node_modules/ed25519',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CC(target) Release/obj.target/ed25519/src/ed25519/keypair.o
../src/ed25519/keypair.c:2:10: fatal error: 'openssl/sha.h' file not found
#include <openssl/sha.h>
         ^
1 error generated.
make: *** [Release/obj.target/ed25519/src/ed25519/keypair.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/Maggie/Documents/RA/FirstElectron/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
gyp ERR! System Darwin 15.5.0
gyp ERR! command "/Users/Maggie/.nvm/versions/node/v8.0.0/bin/node" "/Users/Maggie/Documents/RA/FirstElectron/node_modules/.bin/node-gyp" "rebuild" "--target=1.6.15" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source"
gyp ERR! cwd /Users/Maggie/Documents/RA/FirstElectron/node_modules/ed25519
gyp ERR! node -v v8.0.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 

Failed with exit code: 1

Error: gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@8.0.0 | darwin | x64
gyp info spawn /usr/local/bin/python2
gyp info spawn args [ '/Users/Maggie/Documents/RA/FirstElectron/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/Maggie/Documents/RA/FirstElectron/node_modules/ed25519/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/Maggie/Documents/RA/FirstElectron/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/Maggie/.electron-gyp/.node-gyp/iojs-1.6.15/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/Maggie/.electron-gyp/.node-gyp/iojs-1.6.15',
gyp info spawn args   '-Dnode_gyp_dir=/Users/Maggie/Documents/RA/FirstElectron/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/Maggie/.electron-gyp/.node-gyp/iojs-1.6.15/<(target_arch)/iojs.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/Maggie/Documents/RA/FirstElectron/node_modules/ed25519',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CC(target) Release/obj.target/ed25519/src/ed25519/keypair.o
../src/ed25519/keypair.c:2:10: fatal error: 'openssl/sha.h' file not found
#include <openssl/sha.h>
         ^
1 error generated.
make: *** [Release/obj.target/ed25519/src/ed25519/keypair.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/Maggie/Documents/RA/FirstElectron/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
gyp ERR! System Darwin 15.5.0
gyp ERR! command "/Users/Maggie/.nvm/versions/node/v8.0.0/bin/node" "/Users/Maggie/Documents/RA/FirstElectron/node_modules/.bin/node-gyp" "rebuild" "--target=1.6.15" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source"
gyp ERR! cwd /Users/Maggie/Documents/RA/FirstElectron/node_modules/ed25519
gyp ERR! node -v v8.0.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 

Failed with exit code: 1
    at SafeSubscriber._error (/Users/Maggie/Documents/RA/FirstElectron/node_modules/spawn-rx/lib/src/index.js:277:84)
    at SafeSubscriber.__tryOrUnsub (/Users/Maggie/Documents/RA/FirstElectron/node_modules/rxjs/Subscriber.js:238:16)
    at SafeSubscriber.error (/Users/Maggie/Documents/RA/FirstElectron/node_modules/rxjs/Subscriber.js:197:26)
    at Subscriber._error (/Users/Maggie/Documents/RA/FirstElectron/node_modules/rxjs/Subscriber.js:128:26)
    at Subscriber.error (/Users/Maggie/Documents/RA/FirstElectron/node_modules/rxjs/Subscriber.js:102:18)
    at MapSubscriber.Subscriber._error (/Users/Maggie/Documents/RA/FirstElectron/node_modules/rxjs/Subscriber.js:128:26)
    at MapSubscriber.Subscriber.error (/Users/Maggie/Documents/RA/FirstElectron/node_modules/rxjs/Subscriber.js:102:18)
    at SafeSubscriber._next (/Users/Maggie/Documents/RA/FirstElectron/node_modules/spawn-rx/lib/src/index.js:251:65)
    at SafeSubscriber.__tryOrUnsub (/Users/Maggie/Documents/RA/FirstElectron/node_modules/rxjs/Subscriber.js:238:16)
    at SafeSubscriber.next (/Users/Maggie/Documents/RA/FirstElectron/node_modules/rxjs/Subscriber.js:185:22)

Do you have any idea?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
maleptcommented, Dec 11, 2017

Seems like you need the OpenSSL headers installed.

0reactions
barbalexcommented, Feb 7, 2019

@malept thanks for helping. I had to work through a slew of problems but finally did manage to get past this error. To the next 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

const web3Obj = new web3(window.ethereum) is not working
1 Answer 1 · Your JS is loading out of order. If you are loading the web3 library after index.js, then index.js doesn't...
Read more >
web3.eth — web3.js 1.0.0 documentation - Read the Docs
Returns the receipt of a transaction by transaction hash. Note. The receipt is not available for pending transactions and returns null . Parameters ......
Read more >
How To Fix the Error "Metamask stopped injecting Web3"?
Metamask stopped injecting Web3. Web3 is not a constructor. The send transactions “from” field must be defined. (intermediate value).toBigNumber ...
Read more >
ethereum/web3.js - Gitter
The issue is not happening when I'm using remix. One example where I tryng to get element from string array as tuple: function...
Read more >
Ethereum Provider API - MetaMask Docs
MetaMask injects a global API into websites visited by its users at window.ethereum . This API allows websites to request users' Ethereum ......
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