np: Fails on first time start with git rev-list error
When run np (v3.0.4) first time on some repo it fails with this output:
Publish a new version of arrgv (current: 0.0.6)
✖ Command failed: git rev-list --tags --max-count=1
usage: git rev-list [OPTION] <commit-id>... [ -- paths... ]
limiting output:
--max-count=<n>
--max-age=<epoch>
...
... and so on
Then if run ‘np major’ (or other command) it works as usual.
On repos, where np was successfully used before, this problem do not appears.
Maybe it is bug.
itaisteinherz earned $40.00 by resolving this issue!
- Checkout the Issuehunt explorer to discover more funded issues.
- Need some help from other developers? Add your repositories on Issuehunt to raise funds.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 13
- Comments: 16
@astur A new version with the fix included has already been released - v4.0.0.
@astur Great 👍🏻 @sindresorhus I’m going to submit #322 to IssueHunt as a PR which fixes this since it seems to be the case here. Also, I think this can be closed now.
@itaisteinherz, it works great with latest version from GitHub.
@jjperezaguinaga solution works for me
Hey folks, also just bumped into this error in a repo in which I have never used
npbefore.I tried to just run
npx npfrom a repo that currently has no tags, and which I’ve manually published the repo to npm once. Can’t think of any other discerning features of this repo.I had a look at the error message that git provides & it seems the
<commit-id>argument is missing.(…confirmed by running
git rev-list --tags --max-count=1manually)An obvious commit id would be
HEAD, as ingit rev-list --tags --max-count=1 HEAD, which does give me some kind of hash - I don’t know if that is the correct behavior, but I hope that’s helpful for anyone who might want to fix this 😃Thanks to Sindre & the squad for this awesome module ✌️
I can confirm I was faced with the same issue when trying to run
npon its own. Providing an argument likenp 0.1.0seems to have solved the issue in my case.