Skip to content

It's looking for node-typ under /Users/johnh/.node-gyp #518

Closed

Description

@cheapsteak
Assertion failed: (handle->InternalFieldCount() > 0), function Unwrap, file /Users/johnh/.node-gyp/0.10.36/src/node_object_wrap.h, line 61.

Eh?

Activity

  1. johnhaley81 commented on Mar 27, 2015

    @johnhaley81
    Collaborator

    Get off of my computer!!!

    You're getting that error because I published that binary and it stored those file paths in the compiled file.

    What were you calling that you got that error?

  2. cheapsteak commented on Mar 28, 2015

    @cheapsteak
    Author

    repo.getCurrentBranch() after calling Repository.open(pathToRepo);

  3. johnhaley81 commented on Mar 28, 2015

    @johnhaley81
    Collaborator

    Can you post the code block?

  4. cheapsteak commented on Mar 28, 2015

    @cheapsteak
    Author

    My apologies, the error is my own.

    I misused getCurrentBranch as a sync function that returns a value instead of a promise.

    I was doing this

    var currentBranchRef = repo.getCurrentBranch();
    var currentBranchName = Branch.name(currentBranchRef);

    when I should have been doing this

    var currentBranchRef = await repo.getCurrentBranch(); //edited: March 30th 10:21
    var currentBranchName = currentBranchRef.name();

    btw for some reason this results in a malloc error

    var currentBranchRef = await repo.getCurrentBranch();
    var currentBranchName = Branch.name(currentBranchRef);

    but that's a separate issue and I'm probably using something wrong again. feel free to close this issue :)
    Thank you for the prompt responses!

    fwiw the error message was

    { then: [Function],
      state: null,
      isFulfilled: [Function],
      isRejected: [Function],
      isPending: [Function],
      value: [Function],
      reason: [Function] }
    node(20817,0x7fff78ac6300) malloc: *** error for object 0x100d022e7: pointer being freed was not allocated
    *** set a breakpoint in malloc_error_break to debug
    sh: line 1: 20817 Abort trap: 6           node deploy.js
  5. maxkorp commented on Mar 30, 2015

    @maxkorp
    Collaborator

    Youre still not using promises (or a callback) for those.

    var currentBranchRef; 
    var currentBranchName;
    repo.getCurrentBranch().then(function(branchRef) {
        currentBranchRef = branchRef;
        currentBranchName = currentBranchRef.name();
    });
  6. cheapsteak commented on Mar 30, 2015

    @cheapsteak
    Author

    apologies, I copy pasted from the one above, changed one line and forgot to change the other

    I ended up doing this and that did work

    var currentBranchRef = await repo.getCurrentBranch();
    var currentBranchName = currentBranchRef.name();
  7. tbranyen commented on Mar 30, 2015

    @tbranyen
    Member

    @cheapsteak gah I love how async/await looks with NodeGit, ES6/7 can't come soon enough!

  8. maxkorp commented on Mar 30, 2015

    @maxkorp
    Collaborator

    excellent
    Mr Burns

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