Skip to content

Troubleshooting

Error: Can't find a GitHub token to use

You must set a GH_TOKEN for auto to work. If you publish to npm make sure to add your NPM_TOKEN while you're at it as well.

Working directory not clean

To version and publish you cannot have any changes in the git repo during publish. This means that if you build some files before release that aren't git-ignored auto will fail to continue. To fix this either add those dist files to your .gitignore or commit them somehow before the release.

You cannot publish over the previously published versions

If you've encountered any of these errors you'll probably run into this problem. If the whole release process doesn't complete you can end up in a state when auto published the new version, but doesn't push that back to github. To fix this just bump the version number to the "previously published version".

How do I auto a fork of another repo?

If auto doesn't find a last release it will default to the first commit for version calculation (and a log of other things). If you have forked a repo, you fork all the merge commit messages as well. This confuses auto since it will look for those pull requests in your fork and not the main one.

To remedy this first tag your first commit in the fork with your first version. If the tags from the original repo are still in your repo you should just bump that version. This will let auto ignore all the old merge commits.

⚠️ You must also match this new tag version in your package.json

# Set head to last release and tag it with 2.10.1
git tag v2.10.1
# Set head to last release and tag it with 2.10.1
git tag v2.10.1

Then on GitHub go to your project, click release, then draft a new release. Select the tag you just published and publish release. Now auto will be able to use the correct version and git log!