# A release couldn't be made

What "the tag is already there" means for axle release and how to fix it.

```text
error: the tag ui@1.4.0 is already there
hint: A version is only released once. Delete the tag if it was made by mistake, or release the commits after it.
```

## Why it happens

[`axle release`](https://axlers.dev/docs/reference/release.md) couldn't work out or make the release:

- A tag is already there. The new version was released before, perhaps from another branch.
- A version it can't read. A `package.json` has a version that isn't one [Semantic Versioning](https://semver.org/) allows, such as `1.2` or `01.2.0`.
- A version it can't bump. Its numbers are already the highest Axle can count to, `18446744073709551615`.
- A pre-release it can't continue. A package on a pre-release such as `1.0.0-1`, whose first part isn't a name, has changes, and `axle release` can't tell which pre-release comes next.
- A version that would go down. A [pre-release](https://axlers.dev/docs/reference/release.md#pre-releases) name sorts before the current one, so `--pre alpha` on `1.3.0-beta.1` would make `1.3.0-alpha.0`, an older version.
- A file in `alsoUpdate` doesn't have the version. None of its lines that mention `version` has the packages' current version.
- A version can't be a tag. The package's name has a character Git doesn't allow in a tag, such as `~`, `^` or `:`, which npm allows. Axle checks every tag before it writes anything.
- The lockfile couldn't be updated. The package manager failed while writing the new versions into the lockfile. Axle puts the repository back as it was, so nothing is released.
- There's no history to read. The folder isn't in a Git repository, or the repository has no commit yet.
- Git failed. Reading the history, committing or tagging went wrong, and the message gives Git's own reason. When committing or tagging fails, Axle puts the repository back as it was, deleting the tags it had made, so nothing is released.

## How to fix it

- For a tag that's there, check `git tag --list` and `git log`: if the tag is right, the version was released, so the next release starts after it. Delete a tag made by mistake with `git tag -d <tag>`.
- Give the package a version such as `1.2.0` or `1.2.0-beta.1`.
- For a pre-release Axle can't continue, run `axle release --pre beta` to start a new one, or `axle release --graduate` for a stable version.
- For a version that would go down, pick a pre-release name that sorts after the current one, such as `rc` after `beta`, or graduate.
- Set the file in `alsoUpdate` to the packages' version once, or take it out of the list.
- Rename a package whose name can't be a tag.
- When the lockfile couldn't be updated, fix what the package manager printed, then run `axle release` again.
- Run `git init` and commit, then release.
- When Git failed, fix what it said, such as a commit hook that refuses the message or tag signing without a key, then run `axle release` again.
