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.

Node Gyp Ursa Issue

See original GitHub issue

So I’m receiving the following error when I run NPM start:

> ipfs-desktop@0.5.0 start /Users/johnhopkins-lg/ipfs-desktop
> electron-forge --verbose start

✔ Checking your system
✔ Locating Application
✖ Preparing native dependencies: 0 / 7

An unhandled error has occurred inside Forge:
  CXX(target) Release/obj.target/ursaNative/src/ursaNative.o
In file included from ../src/ursaNative.cc:3:
../src/ursaNative.h:13:10: fatal error: 'openssl/rsa.h' file not found
#include <openssl/rsa.h>
         ^~~~~~~~~~~~~~~
1 error generated.
make: *** [Release/obj.target/ursaNative/src/ursaNative.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/johnhopkins-lg/ipfs-desktop/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Darwin 17.5.0
gyp ERR! command "/usr/local/Cellar/node/8.9.2/bin/node" "/Users/johnhopkins-lg/ipfs-desktop/node_modules/.bin/node-gyp" "rebuild" "--target=3.0.6" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source"
gyp ERR! cwd /Users/johnhopkins-lg/ipfs-desktop/node_modules/ursa-optional
gyp ERR! node -v v8.9.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok

Failed with exit code: 1
Error:   CXX(target) Release/obj.target/ursaNative/src/ursaNative.o
In file included from ../src/ursaNative.cc:3:
../src/ursaNative.h:13:10: fatal error: 'openssl/rsa.h' file not found
#include <openssl/rsa.h>
         ^~~~~~~~~~~~~~~
1 error generated.
make: *** [Release/obj.target/ursaNative/src/ursaNative.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/johnhopkins-lg/ipfs-desktop/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Darwin 17.5.0
gyp ERR! command "/usr/local/Cellar/node/8.9.2/bin/node" "/Users/johnhopkins-lg/ipfs-desktop/node_modules/.bin/node-gyp" "rebuild" "--target=3.0.6" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source"
gyp ERR! cwd /Users/johnhopkins-lg/ipfs-desktop/node_modules/ursa-optional
gyp ERR! node -v v8.9.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok

Failed with exit code: 1
    at SafeSubscriber._error (/Users/johnhopkins-lg/ipfs-desktop/node_modules/spawn-rx/lib/src/index.js:277:84)
    at SafeSubscriber.__tryOrUnsub (/Users/johnhopkins-lg/ipfs-desktop/node_modules/rxjs/Subscriber.js:242:16)
    at SafeSubscriber.error (/Users/johnhopkins-lg/ipfs-desktop/node_modules/rxjs/Subscriber.js:201:26)
    at Subscriber._error (/Users/johnhopkins-lg/ipfs-desktop/node_modules/rxjs/Subscriber.js:132:26)
    at Subscriber.error (/Users/johnhopkins-lg/ipfs-desktop/node_modules/rxjs/Subscriber.js:106:18)
    at MapSubscriber.Subscriber._error (/Users/johnhopkins-lg/ipfs-desktop/node_modules/rxjs/Subscriber.js:132:26)
    at MapSubscriber.Subscriber.error (/Users/johnhopkins-lg/ipfs-desktop/node_modules/rxjs/Subscriber.js:106:18)
    at SafeSubscriber._next (/Users/johnhopkins-lg/ipfs-desktop/node_modules/spawn-rx/lib/src/index.js:251:65)
    at SafeSubscriber.__tryOrUnsub (/Users/johnhopkins-lg/ipfs-desktop/node_modules/rxjs/Subscriber.js:242:16)
    at SafeSubscriber.next (/Users/johnhopkins-lg/ipfs-desktop/node_modules/rxjs/Subscriber.js:189:22)
    at Subscriber._next (/Users/johnhopkins-lg/ipfs-desktop/node_modules/rxjs/Subscriber.js:129:26)
    at Subscriber.next (/Users/johnhopkins-lg/ipfs-desktop/node_modules/rxjs/Subscriber.js:93:18)
    at DefaultIfEmptySubscriber._next (/Users/johnhopkins-lg/ipfs-desktop/node_modules/rxjs/operators/defaultIfEmpty.js:67:26)
    at DefaultIfEmptySubscriber.Subscriber.next (/Users/johnhopkins-lg/ipfs-desktop/node_modules/rxjs/Subscriber.js:93:18)
    at TakeLastSubscriber._complete (/Users/johnhopkins-lg/ipfs-desktop/node_modules/rxjs/operators/takeLast.js:102:29)
    at TakeLastSubscriber.Subscriber.complete (/Users/johnhopkins-lg/ipfs-desktop/node_modules/rxjs/Subscriber.js:118:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ipfs-desktop@0.5.0 start: `electron-forge --verbose start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ipfs-desktop@0.5.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

So I’ve figured out that it has something to do with node-gyp and openSSL. There were some issues on the node-gyp github where it was suggested that reinstalling xcode would solve it. Tried that to no avail. I also attempted changing the binding.gyp file as was suggested in another issue and that did eleminate this error, but produced another which seemed substantially similar:

> electron-forge --verbose start

✔ Checking your system
✔ Locating Application
✖ Preparing native dependencies: 0 / 7

An unhandled error has occurred inside Forge:
make: *** No rule to make target `Release/obj.target/binding/src/binding.o', needed by `Release/binding.node'.  Stop.
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/johnhopkins-lg/ipfs-desktop/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Darwin 17.5.0
gyp ERR! command "/usr/local/Cellar/node/8.9.2/bin/node" "/Users/johnhopkins-lg/ipfs-desktop/node_modules/.bin/node-gyp" "rebuild" "--target=3.0.6" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source"
gyp ERR! cwd /Users/johnhopkins-lg/ipfs-desktop/node_modules/ursa-optional
gyp ERR! node -v v8.9.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok

Failed with exit code: 1
Error: make: *** No rule to make target `Release/obj.target/binding/src/binding.o', needed by `Release/binding.node'.  Stop.
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/johnhopkins-lg/ipfs-desktop/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Darwin 17.5.0
gyp ERR! command "/usr/local/Cellar/node/8.9.2/bin/node" "/Users/johnhopkins-lg/ipfs-desktop/node_modules/.bin/node-gyp" "rebuild" "--target=3.0.6" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source"
gyp ERR! cwd /Users/johnhopkins-lg/ipfs-desktop/node_modules/ursa-optional
gyp ERR! node -v v8.9.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok

Failed with exit code: 1
    at SafeSubscriber._error (/Users/johnhopkins-lg/ipfs-desktop/node_modules/spawn-rx/lib/src/index.js:277:84)
    at SafeSubscriber.__tryOrUnsub (/Users/johnhopkins-lg/ipfs-desktop/node_modules/rxjs/Subscriber.js:242:16)
    at SafeSubscriber.error (/Users/johnhopkins-lg/ipfs-desktop/node_modules/rxjs/Subscriber.js:201:26)
    at Subscriber._error (/Users/johnhopkins-lg/ipfs-desktop/node_modules/rxjs/Subscriber.js:132:26)
    at Subscriber.error (/Users/johnhopkins-lg/ipfs-desktop/node_modules/rxjs/Subscriber.js:106:18)
    at MapSubscriber.Subscriber._error (/Users/johnhopkins-lg/ipfs-desktop/node_modules/rxjs/Subscriber.js:132:26)
    at MapSubscriber.Subscriber.error (/Users/johnhopkins-lg/ipfs-desktop/node_modules/rxjs/Subscriber.js:106:18)
    at SafeSubscriber._next (/Users/johnhopkins-lg/ipfs-desktop/node_modules/spawn-rx/lib/src/index.js:251:65)
    at SafeSubscriber.__tryOrUnsub (/Users/johnhopkins-lg/ipfs-desktop/node_modules/rxjs/Subscriber.js:242:16)
    at SafeSubscriber.next (/Users/johnhopkins-lg/ipfs-desktop/node_modules/rxjs/Subscriber.js:189:22)
    at Subscriber._next (/Users/johnhopkins-lg/ipfs-desktop/node_modules/rxjs/Subscriber.js:129:26)
    at Subscriber.next (/Users/johnhopkins-lg/ipfs-desktop/node_modules/rxjs/Subscriber.js:93:18)
    at DefaultIfEmptySubscriber._next (/Users/johnhopkins-lg/ipfs-desktop/node_modules/rxjs/operators/defaultIfEmpty.js:67:26)
    at DefaultIfEmptySubscriber.Subscriber.next (/Users/johnhopkins-lg/ipfs-desktop/node_modules/rxjs/Subscriber.js:93:18)
    at TakeLastSubscriber._complete (/Users/johnhopkins-lg/ipfs-desktop/node_modules/rxjs/operators/takeLast.js:102:29)
    at TakeLastSubscriber.Subscriber.complete (/Users/johnhopkins-lg/ipfs-desktop/node_modules/rxjs/Subscriber.js:118:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ipfs-desktop@0.5.0 start: `electron-forge --verbose start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ipfs-desktop@0.5.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

It seems to be realated to the UrsaNative module. Has anyone else run into this? Anyone know how to fix it?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
phonikscommented, Nov 8, 2018

Found my solution:

https://medium.com/@timmykko/using-openssl-library-with-macos-sierra-7807cfd47892

It seems that there’s an issue with MacOS High Sierra not knowing where to look for native openssl. Creating new symlinks allowed the build process to complete normally.

0reactions
hacdiascommented, Nov 22, 2018

I’ll close this issue. Let’s keep the conv on #684.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't install · Issue #176 · JoshKaufman/ursa - GitHub
Try this: Remove ~/.node-gyp; Install and set node LTS (v8.11.4); Try to install ursa. This worked for ...
Read more >
Having issues with installing URSA on node npm
Whenever I try npm install --save ursa it fails. My Error is --> C:\Users\Journey\Desktop\Encrypt\node_modules\ ...
Read more >
minor ursa + node-gyp issue - VADOSWARE
While trying to npm install from my application directory (after adding ursa as a dependency), I was getting a failure installing ursa.
Read more >
URSA - RSA public/private key OpenSSL bindings for Node.js
This Node module provides a fairly complete set of wrappers for the RSA public/private key crypto functionality of OpenSSL.
Read more >
Node-gyp error on running npm install - Super User
node-gyp seems to require Python 2. First download Python 2, then set the version of Python that node uses like this: npm config...
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