nodegit / nodegit/nodegit

install fails on windows

Open
#1,632 8 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
5.8k
Forks
704
PR merge metrics
No merged PRs in 30d

Description

System information

  • node version:
  • npm or yarn version:
  • OS/version/architecture:
  • Applicable nodegit version:
PS E:\play\project> node -v
v11.9.0
PS E:\play\project> npm -v # (or yarn -v)
6.5.0
PS E:\play\project> node -e "console.log(process.platform)"
win32
PS E:\play\project> node -e "console.log(require('os').release())"
10.0.17134
PS E:\play\project> node -e "console.log(console.log(process.arch))"
x64
PS E:\play\project> npm i nodegit

> nodegit@0.24.1 install E:\play\project\node_modules\nodegit
> node lifecycleScripts/preinstall && node lifecycleScripts/install

[nodegit] Running pre-install script
[nodegit] Running install script
node-pre-gyp
WARN Using request for node-pre-gyp https download
node-pre-gyp
WARN Tried to download(404): https://axonodegit.s3.amazonaws.com/nodegit/nodegit/nodegit-v0.24.1-node-v67-win32-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for nodegit@0.24.1 and node@11.9.0 (node-v67 ABI, unknown) (falling back to source compile with node-gyp)
Warning: Missing input files:
E:\play\project\node_modules\nodegit\build\vendor\..\..\vendor\libgit2\src\bswap.h
E:\play\project\node_modules\nodegit\build\vendor\..\..\vendor\libgit2\src\merge_file.h
gyp
ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: spawn C:\vs16\MSBuild\15.0\Bin\MSBuild.exe ENOENT
gyp ERR! stack
at Process.ChildProcess._handle.onexit (internal/child_process.js:246:19)
gyp ERR! stack     at onErrorNT (internal/child_process.js:421:16)
gyp ERR! stack     at processTicksAndRejections (internal/process/next_tick.js:76:17)
gyp
ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Me\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--module=E:\\play\\project\\node_modules\\nodegit\\build\\Release\\nodegit.node" "--module_name=nodegit" "--module_path=E:\\play\\project\\node_modules\\nodegit\\build\\Release" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v67"
gyp ERR! cwd E:\play\project\node_modules\nodegit
gyp ERR! node -v v11.9.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/nodejs/node-gyp/issues>
node-pre-gyp
ERR! build error
node-pre-gyp
ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\Me\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=E:\play\project\node_modules\nodegit\build\Release\nodegit.node --module_name=nodegit --module_path=E:\play\project\node_modules\nodegit\build\Release --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v67' (7)
node-pre-gyp ERR! stack
at ChildProcess.<anonymous> (E:\play\project\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:197:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:978:16)
node-pre-gyp
ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
node-pre-gyp
ERR! System Windows_NT 10.0.17134
node-pre-gyp ERR!
command "C:\\Program Files\\nodejs\\node.exe" "E:\\play\\project\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd E:\play\project\node_modules\nodegit
node-pre-gyp ERR! node -v v11.9.0
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\Me\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=E:\play\project\node_modules\nodegit\build\Release\nodegit.node --module_name=nodegit --module_path=E:\play\project\node_modules\nodegit\build\Release --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v67' (7)
[nodegit] ERROR - Could not finish install
[nodegit] ERROR - finished with error code: 1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin with the lifecycleScripts/preinstall and lifecycleScripts/install entry points and the node-pre-gyp/node-gyp fallback shown in the log. Reproduce npm i nodegit on Windows with the reported Node and npm versions, then verify the package installs without the MSBuild ENOENT failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.