Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on npm install -g generator-nod #31

Open
clodal opened this issue Dec 25, 2017 · 4 comments
Open

Error on npm install -g generator-nod #31

clodal opened this issue Dec 25, 2017 · 4 comments

Comments

@clodal
Copy link

clodal commented Dec 25, 2017

Hi thanks for this amazing repo!

Ran into the following error while trying to install the generator. I think it's related to: nodegit/nodegit#1347

Can anybody confirm? Thanks!

  • macOS 10.13.2
  • node 8.7.0
  • npm 5.5.1
➜  ~ npm install -g generator-nod

> [email protected] install /usr/local/lib/node_modules/generator-nod/node_modules/nodegit
> node lifecycleScripts/preinstall && node lifecycleScripts/install

[nodegit] Running pre-install script
[nodegit] Configuring libssh2.
{ Error: Command failed: /usr/local/lib/node_modules/generator-nod/node_modules/nodegit/vendor/libssh2/configure --with-libssl-prefix=/usr/local/lib/node_modules/generator-nod/node_modules/nodegit/vendor/openssl/openssl
/usr/local/lib/node_modules/generator-nod/node_modules/nodegit/vendor/libssh2/missing: Unknown `--is-lightweight' option
Try `/usr/local/lib/node_modules/generator-nod/node_modules/nodegit/vendor/libssh2/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: No crypto library found!
Try --with-libssl-prefix=PATH
 or --with-libgcrypt-prefix=PATH
 or --with-wincng on Windows

    at ChildProcess.exithandler (child_process.js:271:12)
    at emitTwo (events.js:125:13)
    at ChildProcess.emit (events.js:213:7)
    at maybeClose (internal/child_process.js:927:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
  killed: false,
  code: 1,
  signal: null,
  cmd: '/usr/local/lib/node_modules/generator-nod/node_modules/nodegit/vendor/libssh2/configure --with-libssl-prefix=/usr/local/lib/node_modules/generator-nod/node_modules/nodegit/vendor/openssl/openssl' }
/usr/local/lib/node_modules/generator-nod/node_modules/nodegit/vendor/libssh2/missing: Unknown `--is-lightweight' option
Try `/usr/local/lib/node_modules/generator-nod/node_modules/nodegit/vendor/libssh2/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: No crypto library found!
Try --with-libssl-prefix=PATH
 or --with-libgcrypt-prefix=PATH
 or --with-wincng on Windows

[nodegit] ERROR - Could not finish preinstall
{ Error: Command failed: /usr/local/lib/node_modules/generator-nod/node_modules/nodegit/vendor/libssh2/configure --with-libssl-prefix=/usr/local/lib/node_modules/generator-nod/node_modules/nodegit/vendor/openssl/openssl
/usr/local/lib/node_modules/generator-nod/node_modules/nodegit/vendor/libssh2/missing: Unknown `--is-lightweight' option
Try `/usr/local/lib/node_modules/generator-nod/node_modules/nodegit/vendor/libssh2/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: No crypto library found!
Try --with-libssl-prefix=PATH
 or --with-libgcrypt-prefix=PATH
 or --with-wincng on Windows

    at ChildProcess.exithandler (child_process.js:271:12)
    at emitTwo (events.js:125:13)
    at ChildProcess.emit (events.js:213:7)
    at maybeClose (internal/child_process.js:927:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
  killed: false,
  code: 1,
  signal: null,
  cmd: '/usr/local/lib/node_modules/generator-nod/node_modules/nodegit/vendor/libssh2/configure --with-libssl-prefix=/usr/local/lib/node_modules/generator-nod/node_modules/nodegit/vendor/openssl/openssl' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node lifecycleScripts/preinstall && node lifecycleScripts/install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install 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!     ~/.npm/_logs/2017-12-25T09_46_12_726Z-debug.log
@jkeen
Copy link

jkeen commented Feb 25, 2018

Same issue here

  • macOS 10.13.3
  • node 8.9.4
  • npm 5.6.0

@diegohaz
Copy link
Owner

It seems to be a long-standing issue on nodegit. I had this problem in the past, but have been able to fix that on my machine by following some instructions on nodegit/nodegit#1347

Even so, if you guys can't fix this on your machine, there's also the option to use the repository as a boilerplate: https://github.com/diegohaz/nod#install

@tcodes0
Copy link

tcodes0 commented Sep 20, 2018

This is such a pain. nodegit#1347 has a comment mentioning spaces in the cwd, but that's for the pre-install configuring of libssh2 error, right? I'm getting an error where it fails because too many errors.

@ecerroni
Copy link

I had the same issue:

  • Ubuntu 16.04
  • node v9.1.0

Solved after doing sudo apt-get install libssl-dev libcurl4-openssl-dev as per instructions on nodegit/nodegit#1347

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants