question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: "Could not find commit hash for master"

See original GitHub issue

Hey there—I’m trying to get started with Svelte and running:

Environment:

  • macOS 10.14 Mojave
  • Node v8.11.4
  • degit v2.1.3

Running:

degit sveltejs/template-webpack

… gives me:

! could not find commit hash for master

Double checking that the user/repo is correct, I’m not really sure why it can’t find the hash. I tried it with a couple other repos out there and no-go.

Any ideas?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:15
  • Comments:41

github_iconTop GitHub Comments

9reactions
cogoocommented, May 22, 2019

Setting the cache value to false in the degit options solved this for me:

degit(repo, {
      cache: false,
      force: true,
      verbose: true,
    });
7reactions
docmarscommented, Oct 4, 2018

Well derp, I was trying to run this on a new Macbook Pro that I hadn’t installed Xcode or the Command Line Tools on, so git wasn’t ready to go yet. Now that it’s installed, I tried degit again and everything worked like a charm.

It may be pertinent in the rare cases when people don’t have git properly configured (who even does that?!) that degit properly pass any errors along that may occur like this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npx degit could not find commit hash for master - Stack Overflow
You've got a typo in your degit command: sveltesj instead of sveltejs .
Read more >
Commits API - GitLab Docs
An array of action hashes to commit as a batch. See the next table for what attributes it can take. author_email, string, no,...
Read more >
did not find object for shallow <commit-hash>" error | Bamboo
This happens when you have a shallow clone and the branch on the origin repository gets force-updated (for instance force-push). When that happens,...
Read more >
git-rev-list Documentation - Git
Commits are included if they are not TREESAME to any parent (though this can be changed, see --sparse below). If the commit was...
Read more >
Oh Shit, Git!?!
Git documentation has this chicken and egg problem where you can't search for how to get ... Oh shit, I need to change...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found