Repository navigation
Unable to compile and install v0.4.0 on Windows #575
Description
I've got similar issue as described in #536 but for node.js v0.12.3, when building v0.4.0 on Windows.
$ npm install nodegit@0.4.0
\
nodegit@0.4.0 install c:\Projects\gitws\BOF\node_modules\nodegit
node lifecycleScripts/install
[nodegit] Fetching binary from S3.
[nodegit] Failed to install prebuilt binary, building manually.
[nodegit] Making sure dependencies are available and native code is generated
[nodegit] Everything is ready to go, attempting compilation
[nodegit] Building native node module.
{ [Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "c:\Projects\gitws\BOF\node_modules\nodegit\node_modules.bi
n\pangyp rebuild"
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (c:\Projects\gitws\BOF\node_modules\nodegit\node_modules\pangyp\lib\build.js:2
71:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "c:\Projects\gitws\BOF\node_modules\nodegit\node_modules\pangyp\bin\node-gyp.js" "rebui
ld"
gyp ERR! cwd c:\Projects\gitws\BOF\node_modules\nodegit
gyp ERR! node -v v0.12.3
gyp ERR! pangyp -v v2.2.0
gyp ERR! not ok
]
killed: false,
code: 1,
signal: null,
cmd: 'C:\WINDOWS\system32\cmd.exe /s /c "c:\Projects\gitws\BOF\node_modules\nodegit\node_modules.bin\pangy
p rebuild"' }
undefined
nodegit@0.4.0 postinstall c:\Projects\gitws\BOF\node_modules\nodegit
node lifecycleScripts/clean
[nodegit] Cleaning up after ourselves.
[nodegit] Deleting unneeded files.
[nodegit] Finished deleting files.
[nodegit] Pruning devdependencies.
[nodegit] Cleaning unneeded dependencies.
npm WARN uninstall not installed in c:\Projects\gitws\BOF\node_modules\nodegit\node_modules: "for-node-webkit"
unbuild fs-extra@0.18.3
unbuild which-native-nodish@1.1.1
unbuild node-pre-gyp@0.6.7
unbuild npm@2.10.0
[nodegit] Successfully cleaned unneeded dependencies.
unbuild lodash@3.8.0
unbuild combyne@0.8.0
unbuild nan@1.7.0
unbuild request@2.55.0
unbuild js-beautify@1.5.5
unbuild mocha@2.2.5
unbuild tar@2.1.1
unbuild istanbul@0.3.14
unbuild coveralls@2.11.2
unbuild jshint@2.7.0
unbuild pangyp@2.2.0
unbuild nw-gyp@0.12.4
unbuild lcov-result-merger@1.0.2
[nodegit] Failed pruning devdependencies.
[nodegit] Couldn't finish cleaning.
nodegit@0.4.0 node_modules\nodegit
├── promisify-node@0.1.5 (nodegit-promise@1.0.2)
├── which-native-nodish@1.1.1 (find-parent-dir@0.3.0, nodegit-promise@1.0.2)
├── nodegit-promise@2.0.1 (asap@2.0.3)
└── npm@2.10.0
Activity
tbranyen commentedon May 18, 2015
Dupe #565
mamobyz commentedon Jun 3, 2015
I am sorry, this seems not fixed in v0.4.1. And also I don't comprehend, that this issue is a duplicate of #565. 'Build broken on Windows' can have quite different causes. What I now get for v0.4.1 is:
...
[nodegit] Detecting vendor/libgit2/fb6df50b7f250a4fd8b2fab257f119a5185e9bf5.
[nodegit] Detecting vendor/libssh2/1.4.3.
[nodegit] Detecting vendor/http_parser/2.5.0.
[nodegit] Detecting generated code.
[nodegit] vendor/libgit2/fb6df50b7f250a4fd8b2fab257f119a5185e9bf5 already exists.
[nodegit] vendor/libssh2/1.4.3 already exists.
[nodegit] Generated code is intact.
[nodegit] Removing outdated vendor/http_parser/.
[nodegit] Retrieving vendor/http_parser/.
[nodegit] Successfully updated vendor/http_parser/2.5.0.
[nodegit] Everything is ready to go, attempting compilation
[nodegit] Building native node module.
{ [Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "c:\Projects\gitws\BOF\node_modules\nodegit\node_modules.bi
n\pangyp rebuild"
gyp ERR! build error
gyp ERR! stack Error:
C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exefailed with exit code: 1gyp ERR! stack at ChildProcess.onExit (c:\Projects\gitws\BOF\node_modules\nodegit\node_modules\pangyp\lib\build.js:2
71:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "c:\Projects\gitws\BOF\node_modules\nodegit\node_modules\pangyp\bin\node-gyp.js" "rebui
ld"
gyp ERR! cwd c:\Projects\gitws\BOF\node_modules\nodegit
gyp ERR! node -v v0.12.3
gyp ERR! pangyp -v v2.2.1
gyp ERR! not ok
]
killed: false,
code: 1,
signal: null,
cmd: 'C:\WINDOWS\system32\cmd.exe /s /c "c:\Projects\gitws\BOF\node_modules\nodegit\node_modules.bin\pangy
p rebuild"' }
undefined
nodegit@0.4.1 node_modules\nodegit
├── promisify-node@0.1.5 (nodegit-promise@1.0.2)
├── nodegit-promise@2.0.1 (asap@2.0.3)
├── which-native-nodish@1.1.1 (find-parent-dir@0.3.0, nodegit-promise@1.0.2)
└── npm@2.11.0
maxkorp commentedon Jun 3, 2015
Re: duplicity, since the build was 100% always broken in windows (not just in some circumstances), this was assumed to be part of that. Clearly, this is a separate issue.
Do you have multiple versions of VS installed by chance?
In a new directory, if you could try both
npm install timeandnpm install nodegit, and post the output of both, that would be helpful.mamobyz commentedon Jun 8, 2015
@maxkorp: I think I have got only a single installation of VS (VS Express 2013) on my Windows computer. I did not need VS/.NET SDK etc prior to nodegit. How can I reliably tell whether I have multiple versions of VS installed?
Anyways, I performed
npm install timeandnpm install nodegit. Only the 2nd failed. You can download the cmd-line output at: https://gist.github.com/mamobyz/7e786c135ff1af6ba5f1.maxkorp commentedon Jun 8, 2015
Well then, that's unusual. Re: requiring visual studio, most native modules do, nodegit is not the odd one out here. We usually provide prebuilt binaries which get downloaded instead. We just haven't had time to get those out.
As far as reliably knowing which VS versions are installed? I'd guess just the remove software panel in control panel? Not saying to actually uninstall, but the contents there should indicate which versions are installed.
I should be at a windows computer sometime in the next few days, I'll see what I can do about the build error 👍
mamobyz commentedon Jun 17, 2015
Today, I gave it another try. Surprisingly, it worked fine. I don't know why it did not work last time, Windows ...
I think, the issue can be considered resolved!
tbranyen commentedon Jun 17, 2015
@mamobyz I just published Windows prebuilt binaries for 0.4.1 so that's probably why.