Nodegit: Cannot install

Created on 28 Jun 2018  路  7Comments  路  Source: nodegit/nodegit

Hi! I'm trying to execute npm install nodegit and this is what I have. Do you have any ideas how to solve this? I work behind proxy. May be node-pre-gyp needs some configuration. Thank you!

`npm WARN npm npm does not support Node.js v10.1.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/

[email protected] install c:\Users\pplenkov\workspace\fiori_wsnode_modules\nodegit
node lifecycleScripts/preinstall && node lifecycleScripts/install

[nodegit] Running pre-install script
[nodegit] Running install script
node-pre-gyp ERR! Tried to download(404): https://axonodegit.s3.amazonaws.com/nodegit/nodegit/nodegit-v0.22.1-node-v64-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
gyp
ERR! configure error
gyp ERR!
stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Users\pplenkov\AppData\Roaming\npmnode_modules\npmnode_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder. (C:\Users\pplenkov\AppData\Roaming\npmnode_modules\npmnode_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at C:\Users\pplenkov\AppData\Roaming\npmnode_modules\npmnode_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:165:21)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\pplenkov\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "--fallback-to-build" "--module=c:\Users\pplenkov\workspace\fiori_ws\node_modules\nodegit\build\Release\nodegit.node" "--module_name=nodegit" "--module_path=c:\Users\pplenkov\workspace\fiori_ws\node_modules\nodegit\build\Release"
gyp ERR! cwd c:\Users\pplenkov\workspace\fiori_wsnode_modules\nodegit
gyp ERR! node -v v10.1.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp
ERR!
build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\pplenkov\AppData\Roaming\npmnode_modules\npmnode_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=c:\Users\pplenkov\workspace\fiori_wsnode_modules\nodegit\build\Release\nodegit.node --module_name=nodegit --module_path=c:\Users\pplenkov\workspace\fiori_wsnode_modules\nodegit\build\Release' (1)
node-pre-gyp ERR! stack at ChildProcess. (c:\Users\pplenkov\workspace\fiori_wsnode_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR!
stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:957:16)
node-pre-gyp ERR!
stack at Process.ChildProcess._handle.onexit (internal/child_process.js:246:5)
node-pre-gyp
ERR!
System
Windows_NT 6.1.7601
node-pre-gyp
ERR!
command
"C:\Program Files\nodejs\node.exe" "c:\Users\pplenkov\workspace\fiori_ws\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp
ERR!
cwd
c:\Users\pplenkov\workspace\fiori_wsnode_modules\nodegit
node-pre-gyp
ERR!

node -v
v10.1.0
node-pre-gyp

ERR!
node-pre-gyp -v
v0.6.39
node-pre-gyp

ERR!
not ok

Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\pplenkov\AppData\Roaming\npmnode_modules\npmnode_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=c:\Users\pplenkov\workspace\fiori_wsnode_modules\nodegit\build\Release\nodegit.node --module_name=nodegit --module_path=c:\Users\pplenkov\workspace\fiori_wsnode_modules\nodegit\build\Release' (1)
[nodegit] ERROR - Could not finish install
[nodegit] ERROR - finished with error code: 1
npm WARN rollback Rolling back [email protected] failed (this is probably harmless): EPERM: operation not permitted, rmdir 'c:\Users\pplenkov\workspace\fiori_wsnode_modules\fseventsnode_modules'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

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! C:\Users\pplenkov\AppData\Roaming\npm-cache_logs\2018-06-27T22_59_43_576Z-debug.log`

All 7 comments

@ThePlenkov
Looks like problems with your install start when nodegit tries to compile itself. In particular here:

stack Error: Can't find Python executable "python", you can set the PYTHON env variable.

So I guess addressing that issue may help.

I have compilation issues too, but not exactly like yours.

It all starts with node-pre-gyp ERR! Tried to download(404): https://axonodegit.s3.amazonaws.com/nodegit/nodegit/.... Looks like those files are missing so we have to go through compilation process.

Same here, https://axonodegit.s3.amazonaws.com/nodegit/nodegit/nodegit-v0.22.1-node-v64-darwin-x64.tar.gz is 404, and compilation fails on

fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated. 

in : make: *** [Release/obj.target/libssh2/vendor/libssh2/src/openssl.o] Error 1

ERR! build error
gyp
ERR! stack Error: `make` failed with exit code: 2
gyp ERR!
stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack
at ChildProcess.emit (events.js:182:13)
gyp ERR! stack
at Process.ChildProcess._handle.onexit (internal/child_process.js:235:12)
gyp
ERR! System Darwin 17.6.0
gyp
ERR! command
"/usr/local/Cellar/node/10.1.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/**********/Desktop/**********/**********/**********/**********/node_modules/nodegit/build/Release/nodegit.node" "--module_name=nodegit" "--module_path=/Users/**********/Desktop/**********/**********/**********/**********/node_modules/nodegit/build/Release"
gyp
ERR!
cwd /Users/**********/Desktop/**********/**********/**********/**********/node_modules/nodegit
gyp ERR! node -v v10.1.0
gyp ERR!
node-gyp -v v3.6.2
gyp
ERR! not ok
node-pre-gyp
ERR! build error
node-pre-gyp
ERR! stack Error: Failed to execute '/usr/local/Cellar/node/10.1.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/**********/Desktop/**********/**********/**********/**********/node_modules/nodegit/build/Release/nodegit.node --module_name=nodegit --module_path=/Users/**********/Desktop/**********/**********/**********/**********/node_modules/nodegit/build/Release' (1)
node-pre-gyp ERR!

referencing to #1490

btw downgrading Node to v8.11.2 helped

The main issue here was that Python wasn't in PATH, but Node 10 fails in general anyway, see #1490.

This issue should be closed as duplicate

Yup. These are both node 10, judging from the v64 ABI

npm config set python {path to python2.7} should fix the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

getify picture getify  路  6Comments

fatso83 picture fatso83  路  7Comments

Yezior picture Yezior  路  8Comments

Hufschmidt picture Hufschmidt  路  3Comments

xizhao picture xizhao  路  6Comments