l_7acq
Last Updated: February 25, 2016
·
10.76K
· DamonOehlman
Ed265adf145a12d2e5f09b2a761f232f

Publish Beta Versions of NPM Modules

This is something that I have been meaning to find out how to do for a while, and I managed to find a reference to an old tweet between @isaacs and @maccman. Sure enough it's quite simple.

If you want to publish a version of your module under a tag other than latest (which is what is used by default), then simply include the --tag option when publishing with the name of the tag you wish to use (in this case beta)

npm publish --tag beta

And that's it. The version you have just published will be registered under the beta tag rather than the latest tag, and will not be installed when someone attempts to install your package with the npm install <packagename> command.

Of course this technique is not limited to just publishing beta versions of modules, but it's the most obvious case that I'll be using it for.

Say Thanks
Respond

3 Responses
Add your response

1368

Nice one. Added to the cheat sheet: https://coderwall.com/p/f2btqa

over 1 year ago ·
16188
4209b2e30fc8c6464a80dccb2b737d76

Exactly what I was looking for !!!

over 1 year ago ·
22178
Screen shot 2013 04 17 at 21.36.40

.. how can I remove a published tag?

over 1 year ago ·
Awesome Job

B6c77ad0 c95b 11e7 8263 8f89080b8db6
Ruby Developer Backend
·
Austria (Vienna or Linz)
·
Full Time