Skip to content

Installing nodegit via npm fails at Configuring libssh2. #1347

@timeo-schmidt

Description

@timeo-schmidt

When I try installing nodegit via npm it keeps throwing the following error. I tried the following:

  • brew reinstall gcc
  • I tried reinstalling node via brew and also via the node installer
  • sudo xcode-select --install

Is there anything else I can do? - Having the same issue even on other machines, all running MacOS Sierra.

My Node Version is: v6.11.2
My NPM Version is: 3.10.10

Console Output after npm install nodegit:

[nodegit] Running pre-install script
[nodegit] Configuring libssh2.
{ Error: spawn /bin/sh ENOENT
    at exports._errnoException (util.js:1020:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:367:16)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)
  code: 'ENOENT',
  errno: 'ENOENT',
  syscall: 'spawn /bin/sh',
  path: '/bin/sh',
  spawnargs: 
   [ '-c',
     '/Users/timeoschmidt/Desktop/Freiheit\\ Praktikum/Node\\ Upload\\ Repo/node_modules/nodegit/vendor/libssh2/configure --with-libssl-prefix=/Users/timeoschmidt/Desktop/Freiheit\\ Praktikum/Node\\ Upload\\ Repo/node_modules/nodegit/vendor/openssl/openssl' ],
  cmd: '/Users/timeoschmidt/Desktop/Freiheit\\ Praktikum/Node\\ Upload\\ Repo/node_modules/nodegit/vendor/libssh2/configure --with-libssl-prefix=/Users/timeoschmidt/Desktop/Freiheit\\ Praktikum/Node\\ Upload\\ Repo/node_modules/nodegit/vendor/openssl/openssl' }

[nodegit] ERROR - Could not finish preinstall
{ Error: spawn /bin/sh ENOENT
    at exports._errnoException (util.js:1020:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:367:16)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)
  code: 'ENOENT',
  errno: 'ENOENT',
  syscall: 'spawn /bin/sh',
  path: '/bin/sh',
  spawnargs: 
   [ '-c',
     '/Users/timeoschmidt/Desktop/Freiheit\\ Praktikum/Node\\ Upload\\ Repo/node_modules/nodegit/vendor/libssh2/configure --with-libssl-prefix=/Users/timeoschmidt/Desktop/Freiheit\\ Praktikum/Node\\ Upload\\ Repo/node_modules/nodegit/vendor/openssl/openssl' ],
  cmd: '/Users/timeoschmidt/Desktop/Freiheit\\ Praktikum/Node\\ Upload\\ Repo/node_modules/nodegit/vendor/libssh2/configure --with-libssl-prefix=/Users/timeoschmidt/Desktop/Freiheit\\ Praktikum/Node\\ Upload\\ Repo/node_modules/nodegit/vendor/openssl/openssl' }
npm ERR! Darwin 16.7.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "nodegit"
npm ERR! node v6.11.2
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! nodegit@0.18.3 install: `node lifecycleScripts/preinstall && node lifecycleScripts/install`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the nodegit@0.18.3 install script 'node lifecycleScripts/preinstall && node lifecycleScripts/install'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the nodegit package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node lifecycleScripts/preinstall && node lifecycleScripts/install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs nodegit
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls nodegit
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/timeoschmidt/Desktop/Freiheit Praktikum/Node Upload Repo/npm-debug.log

( If I am running the same command with global -g argument, it seems to install without errors, but my scripts using nodegit still throw the error: Error: Cannot find module 'nodegit' ).

I would really appreciate help or references to other issues with things I can try.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions