Skip to content

Instantly share code, notes, and snippets.

@benjie
Created July 26, 2017 12:16
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benjie/faf8268b955c6f0b438f23193bac9939 to your computer and use it in GitHub Desktop.
Save benjie/faf8268b955c6f0b438f23193bac9939 to your computer and use it in GitHub Desktop.
Resolve publishing npm package to wrong tag

If you accidentally publish a package to the wrong tag (e.g. @latest when you meant to tag it as @next) you can resolve as follows:

npm show PACKAGE_NAME versions # To view the versions you've published
npm dist-tags add PACKAGE_NAME@NEW_VERSION next # Tag the new package version as `@next`
npm dist-tags add PACKAGE_NAME@OLD_VERSION latest # Restore the correct `@latest` to be your previous release version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment