Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"no such sha found" error #43

Open
perry-mitchell opened this issue Aug 13, 2015 · 2 comments
Open

"no such sha found" error #43

perry-mitchell opened this issue Aug 13, 2015 · 2 comments

Comments

@perry-mitchell
Copy link

I'm constantly getting the "no such sha found" error in the get_raw_object_by_sha1 function. I'm using Node 0.12.4 and NPM 2.11.3. The error occurs on the last line of the method (183):

  // No results throw an error that no sha pack object was found
  throw "no such sha found";
}

I'm using version 0.1.5 from npm in a Grunt plugin, fetching tags from the remote repo. It's been working fine before I reinstalled my environment, and now it borks. My co-worker's copy still functions, but he's on Node 0.10.* and npm 2.5.*.

The code in the Grunt plugin that is making the request:

var repo = new Repo(options.git.projectDirectory, {}, function(err, r) {
    r.tags(function(err, tags) {
        var tagArr = [];
        for (var tagIndex in tags) {
            var tag = tags[tagIndex];
            tagArr.push(tag.name);
        }
        (callback)(tagArr);
    });
});

The callback function to r.tags is never called.

@scottnonnenberg
Copy link
Contributor

+1 - ran into this as well. Just tested it on node 0.10.40 and things work fine. Node 4.1.2 does not work.

Also, it's definitely a bug to throw a plain string. It should be throw new Error('no such sha found');

@morganrallen
Copy link

This problem still occurs. I'm using v6.3.1 and cannot fetch tags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants