When bump stops, it prints a FAIL block on stderr and exits with 1, or with 130 or 143 after a signal. Most checks run before bump writes a file, so the repository stays as it was. When a step of the release itself fails, bump undoes it. See Undo.
The errors for config keys are in Config. The errors for arguments and options are in CLI: Type or version, Parsing rules, and Conflicts.
No tag found
$ bump minor
FAIL No tag found for 2 units whose manifests are past 0.0.0
│
│ @acme/core manifest 1.2.0 expected tag @acme/core@1.2.0
│ app manifest 3.4.0 expected tag app@3.4.0
│
│ To continue from the last release, tag the commit that released it:
│ git tag -a @acme/core@1.2.0 -m @acme/core@1.2.0 <commit>
│ git tag -a app@3.4.0 -m app@3.4.0 <commit>
│
│ To use the manifest versions as the base, run again with --adopt:
│ bump minor --adopt → @acme/core 1.3.0, @acme/cli 0.4.2, app 3.5.0Cause: a unit has a version past 0.0.0 in its manifest, but no tag for that version. bump needs the tag to find the changes since the last release. This is common when you start to use bump in an existing repository, or after you change tag in the config.
The error lists every unit with no tag. In lockstep mode, the unit name is (lockstep).
Fix: choose one:
- Tag the commit that released each version, with the commands that the error prints. Put the SHA of that commit in place of
<commit>. bump then finds the changes since that commit. - Run again with
--adopt. bump uses the manifest versions as the base, and releases each unit with no tag as changed. The last line of the error shows the command and the versions that it gives.
$ bump minor --adopt --dryrun
BUMP @acme/core 1.2.0 → 1.3.0 (adopted)
BUMP @acme/cli 0.4.1 → 0.4.2 (dependent)
BUMP app 3.4.0 → 3.5.0 (adopted)
EDIT app devDependencies["@acme/core"] ^1.2.0 → ^1.3.0
EDIT @acme/cli dependencies["@acme/core"] ^1.2.0 → ^1.3.0
DONE Dry run; no files were writtenA unit at 0.0.0 with no tag is a first release, not an error. With targets, bump checks only the targets and the units that depend on them, so an unrelated unit with no tag does not stop bump patch @acme/cli. See Anchors.
Released past the manifest
$ bump patch
FAIL "v1.3.0" is released, but the manifest says 1.2.0Cause: a tag in the history of HEAD has a version greater than the manifest. The manifest and the tags disagree. For example, someone made the tag by hand, or reverted the release commit but kept its tag.
Fix: find out which one is correct. If the release happened, set the manifest to that version and commit. If it did not, delete the tag with git tag -d v1.3.0, and from the remote too if you pushed it.
Anchor not in history
$ bump patch
FAIL The "v1.2.0" release commit is not in the history of HEAD; merge it firstCause: the tag of the manifest version exists, but its commit is not in the history of HEAD. Often, the release happened on another branch.
Fix: merge the branch with the release commit into your branch, then run bump again.
Shallow clone
$ bump patch
FAIL A full clone is needed: the history and tags are used to find changes (in CI, fetch all history and tags)Cause: the repository is a shallow clone. bump needs the full history and all tags.
Fix: fetch all history and tags. See Full clone.
No commits
$ bump patch
FAIL The repository has no commitsCause: HEAD has no commit. bump reads only committed files.
Fix: commit your files, then run bump.
A directory that is not in a git repository gives another error:
$ bump patch
FAIL Not a git repository: "/private/tmp"Dirty tree
$ bump patch
FAIL Commit or stash the changes to tracked files first:
│ notes.md
│ packages/core/index.jsCause: tracked files have changes that are not committed. The list includes staged files. bump commits only its own edits, and it does not mix them with yours.
Fix: commit or stash the listed files. Untracked files do not count.
A dry run does not stop. It prints the list as a warning, then the release:
$ bump patch --dryrun
WARN A release needs a clean tree; these tracked files have changes:
│ notes.md
│ packages/core/index.js
BUMP @acme/core 1.3.0 → 1.3.1 (changed)
BUMP @acme/cli 0.4.2 → 0.4.3 (dependent)
EDIT app devDependencies["@acme/core"] ^1.3.0 → ^1.3.1
EDIT @acme/cli dependencies["@acme/core"] ^1.3.0 → ^1.3.1
DONE Dry run; no files were writtenMerge in progress
$ bump patch
FAIL A bisect is in progress; finish it firstCause: a merge, rebase, cherry-pick, revert, or bisect is in progress. The message names it. A merge with conflicts, or with changes that are not committed, gives the dirty tree error first.
Fix: finish it or abort it, for example with git bisect reset, git merge --continue, or git merge --abort.
Untracked files
$ bump minor
FAIL These files are not tracked by git: "packages/web/package.json"Cause: bump must edit a file that git does not track. Here, a new package is not committed yet.
Fix: commit the file, then run bump again.
An untracked Cargo.lock does not cause this error. bump does not write it. See Lockfiles.
Existing tags
$ bump minor
FAIL These tags already exist: "@acme/web@0.1.0"Cause: a new tag of this release already exists, but not in the history of HEAD. For example, an experiment on another branch made it.
Fix: if the tag is a mistake, delete it with git tag -d @acme/web@0.1.0. Else, release another version: give a higher type or an exact version.
Invalid tag name
$ bump minor
FAIL Invalid tag name: "@acme/core:0.1.0"Cause: the tag template gives a name that git does not accept as a tag. For example, git does not allow a space, :, ~, ^, ?, *, [, or .. in a tag name.
Fix: change tag in the config, for example to {name}@{version}.
Mixed versions
$ bump minor
FAIL All packages must share one version in lockstep mode:
│ @acme/cli 0.9.0
│ @acme/core 1.2.0Cause: all members of a unit must have the same version in their manifests. In lockstep mode, the unit is all versioned packages, and the message names no unit. In a group, it names the group:
$ bump minor
FAIL The members of "acme" must share one version:
│ @acme/core 1.2.0
│ @acme/cli 0.9.0Fix: set one version in each listed manifest and commit. If the version has no tag, see No tag found. If the packages need their own versions, use independent mode, or take the package out of the group.
Shared Cargo versions
$ bump minor
FAIL Crates "acme-cli", "acme-core" share [workspace.package] version; name them in "groups", e.g. "groups": { "<name>": ["acme-cli"] }Cause: in independent mode, crates with version.workspace = true share one version, so they must be one unit. bump cannot choose a name for that unit.
Fix: add a group that lists one of the crates. The other crates join it:
{
"independent": true,
"groups": {
"acme": ["acme-core"]
}
}The group tag is then acme@<version>, so the group needs that tag. See No tag found. With the tag acme@1.2.0 in place, and a change in acme-core:
$ bump minor --dryrun
BUMP acme 1.2.0 → 1.3.0 (changed)
acme-core, acme-cli
DONE Dry run; no files were writtenA root Cargo.toml with a [package] that inherits the version names the group too, with no config. See Cargo.
Must be greater
$ bump prerelease --preid beta
FAIL The next version must be greater than 1.3.0-next.2, but is 1.3.0-beta.0Cause: each new version must be greater than the current one. A preid that sorts lower gives a lower version: beta sorts before next. An exact version that is not higher gives the same error:
$ bump 1.2.0
FAIL The next version must be greater than 1.3.0-next.2, but is 1.2.0Fix: use a preid that sorts higher, such as rc, or a higher exact version. In independent mode, the message names the unit.
Cannot continue a prerelease
$ bump prerelease
FAIL Cannot continue the "1.3.0-0" prerelease; use an exact versionCause: bump continues only a prerelease of the form 1.3.0-next.2 or 1.3.0-next. It cannot continue other forms, such as 1.3.0-0 or 1.3.0-a.b.c.
Fix: give an exact version. After it, prerelease works again:
$ bump 1.3.0-rc.0 --dryrun
BUMP 1.3.0-0 → 1.3.0-rc.0 (changed)
DONE Dry run; no files were writtenWhen the unit is a dependent, release it as a target first:
$ bump patch
FAIL Cannot continue the "0.5.0-0" prerelease of "@acme/cli"; release it as a target with an exact version firstFor example, bump 0.5.0-next.0 @acme/cli. See Prereleases.
Unknown targets
$ bump patch nope @acme/nil
FAIL Unknown targets: "nope", "@acme/nil"Cause: a target is not a package name or a group name. The error lists all unknown targets.
Fix: check the names. A target is the name of a manifest, not a directory.
A package without a version cannot be a target:
$ bump patch @acme/ui
FAIL Package "@acme/ui" has no version, so it cannot be a targetMissing package manager
$ bump minor
FAIL Missing "yarn" binary to update "/private/tmp/acme/yarn.lock"Cause: git tracks an npm lockfile, but its package manager is not on your PATH. bump checks this before it writes a file, also in a dry run.
Fix: install the package manager, or stop to track the lockfile if you do not use it. See Lockfiles.
Packages
These errors come from the manifests:
| Error | Cause |
|---|---|
No packages found |
No glob of packages, and no workspace file, matches a directory with a manifest. See packages. |
No versioned packages found |
No package has a version. |
Invalid version "1.2" in "<file>" |
A version is not a full semver version. |
Two packages are named "@acme/ui": "<file>" and "<file>" |
Two manifests have the same name. |
A manifest without a name is not an error. bump skips it with a warning. Here packages/core/package.json has no name, and the only other package, @acme/docs, has no version:
$ bump patch --dryrun
WARN Missing "name" field in "/private/tmp/acme/packages/core/package.json"
FAIL No versioned packages foundUndo
When a step of the release fails, bump undoes the release. See Undo. The message names the step and the cause:
| Message | Cause |
|---|---|
Could not commit: <output> |
A git hook, such as pre-commit, failed, or git has no identity. |
Could not create tag "v1.2.1": <output> |
git could not make the tag. Often, tag signing failed. |
Could not update "package-lock.json": <output> |
The lockfile command failed. See Lockfiles. |
Stopped by SIGINT, Stopped by SIGTERM |
A signal stopped the release. The exit code is 130 or 143. |
<output> is the first error: or fatal: line of the output of git or of the tool, without that prefix. Without such a line, it is the first line.
$ bump patch
BUMP 1.2.0 → 1.2.1 (changed)
FAIL Could not create tag "v1.2.1": gpg failed to sign the data
│ The release was undone: no files, commits, or tags changed.Fix the cause, then run bump again. Hooks run as usual, and bump has no option to skip them.
If the undo itself fails, the message says The undo failed too:. See Undo.