Skip to content

Failed to install prebuilt binary - add debug info to help figure out reason #758

Closed

Description

@electricmonk

Hi,

Installing nodegit in a node.js Docker image based on node:latest. npm install says "Failed to install prebuilt binary, building manually". This takes forever.

Same happens in my CI environment (TeamCity agents running on Docker containers).

What frustrates me the most is my inability to investigate why this happens. Any way you can pipe the error to stderr or stdout so as to help users investigate?

Thanks

Activity

  1. electricmonk commented on Oct 19, 2015

    @electricmonk
    Author

    Update: also happens on the 'node:0.12.7' image

  2. saper commented on Oct 19, 2015

    @saper
    Collaborator

    Can you produce npm-debug.log file and/or verbose npm output?

  3. electricmonk commented on Oct 19, 2015

    @electricmonk
    Author

    Not really helpful. I can post the entire verbose log, but it's very verbose :)

    �[91minstall nodegit@0.5.0
    �[0m
    
    > nodegit@0.5.0 install /app/node_modules/core3-git-api/node_modules/nodegit
    > node lifecycleScripts/install
    
    
    [nodegit] Fetching binary from S3.
    
    [nodegit] Failed to install prebuilt binary, building manually.
    
    [nodegit] Regenerating and configuring code
    
  4. saper commented on Oct 19, 2015

    @saper
    Collaborator
  5. electricmonk commented on Oct 19, 2015

    @electricmonk
    Author
  6. saper commented on Oct 20, 2015

    @saper
    Collaborator

    You need to configure your npm unsafe-perm to true, or create a non-root user in the container and use it in your npm setup.

  7. electricmonk commented on Oct 20, 2015

    @electricmonk
    Author

    I tried both, neither seems to have any effect

  8. saper commented on Oct 20, 2015

    @saper
    Collaborator

    I have no solution then, sorry.

  9. electricmonk commented on Oct 20, 2015

    @electricmonk
    Author

    Any way we can print the failure reason to stderr / stdout?

  10. samkelleher commented on Nov 7, 2015

    @samkelleher
    Contributor

    In #774 additional log outputs have been added for each step as if there was a gyp compile error, the install would just exit without warning, the the verbose log just had a whole bunch of natter in there.

  11. maxkorp commented on Nov 9, 2015

    @maxkorp
    Collaborator

    I've been meaning to make the output more verbose. As for why it fails to find a prebuilt binary? I don't think node-pre-gyp gives us anything meaningful in that regard, but I'm not totally sure about that tbh.

  12. maxkorp commented on Nov 9, 2015

    @maxkorp
    Collaborator

    The actual issue at hand appears to be related to permissions with the published binary, I'm getting a 403. Adding a pr in just a second to print this info though.

  13. maxkorp commented on Nov 9, 2015

    @maxkorp
    Collaborator

    Fixed in the above PR.
    Side note: The binaries aren't downloading because with CI, we only build in ia32, not x64, so x64 is naturally not getting published. Going to manually publish 0.5.0 for win32x64, and then try to figure out how to get it to just build in x64 except for publishing builds.

  14. tbranyen commented on Jan 15, 2016

    @tbranyen
    Member

    This looks resolved, so closing for now, please comment to re-open if I closed in error.

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