Skip to content

lerna publish recovery

veeramarni edited this page Apr 17, 2017 · 1 revision

Lerna uses git tags to keep track of published versions. It looks like the tag for the version you were in the middle of publishing may have been created before the command failed.

You can see the latest tag with this command:

$ git describe --abbrev=0 --tags
v2.0.0-beta.31

And you can see the associated commit using the tag name:

$ git show v2.0.0-beta.31

The tag should refer to a commit on your current branch. If you haven't made any commits since the failed publish then it should be HEAD.

A few things to check:

  1. Were any of the packages actually published? You can check with npm dist-tag ls . Packages may have been published but may not yet have received the latest tag.
  2. Were your branch and tag pushed to your remote repo? The commits may exist only locally.

It's important to know the state of your packages in the npm registry and your repo in your remote repository before proceeding.