如何使用更新的标签更新npm包

How do I update an npm package with an updated tag

I published a new tag to npm public repo and then pushed the tag to git but I realized I forgot to update the tag numbers. In git I simply deleted the tag and recreated it with the new commits but how would I go about updating the release in the npm repo?

If you want to publish it to the same version as what you have previously on npm, you would need to use the following snippet to unpublish your package. After that is done you would need to republish your package.

However, NPM have said "It is generally considered bad behavior to remove versions of a library that others are depending on!Consider using the deprecate command instead, if your intent is to encourage users to upgrade."

npm unpublish [<@scope>/]<pkg>[@<version>]

See the npm docs.