Skip to content

Unable to compile and install v0.4.0 on Windows #575

Closed

Description

@mamobyz

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

  1. tbranyen commented on May 18, 2015

    @tbranyen
    Member

    Dupe #565

  2. mamobyz commented on Jun 3, 2015

    @mamobyz
    Author

    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.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.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

  3. maxkorp commented on Jun 3, 2015

    @maxkorp
    Collaborator

    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 time and npm install nodegit, and post the output of both, that would be helpful.

  4. reopened this on Jun 3, 2015
  5. mamobyz commented on Jun 8, 2015

    @mamobyz
    Author

    @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 time and npm install nodegit. Only the 2nd failed. You can download the cmd-line output at: https://gist.github.com/mamobyz/7e786c135ff1af6ba5f1.

  6. maxkorp commented on Jun 8, 2015

    @maxkorp
    Collaborator

    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 👍

  7. mamobyz commented on Jun 17, 2015

    @mamobyz
    Author

    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!

  8. tbranyen commented on Jun 17, 2015

    @tbranyen
    Member

    @mamobyz I just published Windows prebuilt binaries for 0.4.1 so that's probably why.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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