nod icon indicating copy to clipboard operation
nod copied to clipboard

Error on `npm install -g generator-nod`

Open clodal opened this issue 8 years ago • 4 comments

Hi thanks for this amazing repo!

Ran into the following error while trying to install the generator. I think it's related to: https://github.com/nodegit/nodegit/issues/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

clodal avatar Dec 25 '17 09:12 clodal

Same issue here

  • macOS 10.13.3
  • node 8.9.4
  • npm 5.6.0

jkeen avatar Feb 25 '18 05:02 jkeen

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 https://github.com/nodegit/nodegit/issues/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

diegohaz avatar Feb 26 '18 04:02 diegohaz

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.

tcodes0 avatar Sep 20 '18 11:09 tcodes0

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

ecerroni avatar Nov 26 '18 10:11 ecerroni