np icon indicating copy to clipboard operation
np copied to clipboard

Command failed with exit code 128

Open slothsoft opened this issue 4 years ago • 4 comments

Description

I tried to publish my module for the very first time (with a brand new npm account as well) and kept getting this error:

>np

Publish a new version of @slothsoft/qunit-reporter (current: 0.1.0)


× Command failed with exit code 128 (Unknown system error -128): git log --format=%s %h d50e9cd0795af9d12371e0418ea95bc3b569d8a0
22b547a9c8b8804d3d35d0cb1645f378c9d46f31..HEAD

However npm publish --access public worked perfectly.

Steps to reproduce

I cannot reproduce it any longer, the command np works now. I assume that the problem has to do with a new module and / or new npm account.

Though there might be a problem with the configuration, here is the tag of the project that produced the error: qunit-reporter/v0.1.0 (Although that doesn't explain why it works now without any changes to the package.json but the version number increment.)

Expected behavior

I expected for np to start normally, not fail.

Environment

np - 5.1.0 (I tried with np globally installed and as module dependency) Node.js - 10.15.3 npm - 6.11.2 Git - 2.20.1.windows.1 OS - Win 10 Pro v1903

slothsoft avatar Sep 14 '19 10:09 slothsoft

+1 at Windows 10 x64 Nodejs 10.16.3 LTS

r3code avatar Sep 19 '19 20:09 r3code

This is due to your repository has 2 initial commits, which results in our firstCommit function in git-utils.js doesn't work as expected. After a tag was created, it will not be called.

I think we can return any one of them.

chinesedfan avatar Nov 26 '19 09:11 chinesedfan

Hello,

I'm encountering the same issue.

I have already committed the package to Github more than once, before installing NP.

Is there a quick fix / workaround?

Regards,

Ian Watson

inkeytech avatar Feb 17 '20 08:02 inkeytech

@inkeytech and anyone encountering this, it's possible to rebase your branch to squash the multiple initial commits into one commit. I found a comment with the steps for doing so here.

nrwinner avatar May 29 '20 14:05 nrwinner