1 npm-tag(1) -- Tag a published version
2 =====================================
6 npm tag <name>@<version> [<tag>]
10 THIS COMMAND IS DEPRECATED. See npm-dist-tag(1) for details.
12 Tags the specified version of the package with the specified tag, or the
13 `--tag` config if not specified.
15 A tag can be used when installing packages as a reference to a version instead
16 of using a specific version number:
18 npm install <name>@<tag>
20 When installing dependencies, a preferred tagged version may be specified:
22 npm install --tag <tag>
24 This also applies to `npm dedupe`.
26 Publishing a package always sets the "latest" tag to the published version.
30 Tags can be used to provide an alias instead of version numbers. For
31 example, `npm` currently uses the tag "next" to identify the upcoming
32 version, and the tag "latest" to identify the current version.
34 A project might choose to have multiple streams of development, e.g.,
39 Tags must share a namespace with version numbers, because they are
40 specified in the same slot: `npm install <pkg>@<version>` vs `npm
43 Tags that can be interpreted as valid semver ranges will be
44 rejected. For example, `v1.4` cannot be used as a tag, because it is
45 interpreted by semver as `>=1.4.0 <1.5.0`. See
46 <https://github.com/npm/npm/issues/6082>.
48 The simplest way to avoid semver problems with tags is to use tags
49 that do not begin with a number or the letter `v`.