Man page - npm-dist-tag(1)
Packages contains this manual
- npm-root(1)
- npm-explain(1)
- npm-whoami(1)
- npm-pack(1)
- npm-bugs(1)
- npm-view(1)
- npm-outdated(1)
- npm-update(1)
- npm-query(1)
- npm-logout(1)
- npm-deprecate(1)
- npm-exec(1)
- npm-ping(1)
- npm-shrinkwrap-json(5)
- npm-help(1)
- npm-prefix(1)
- npm-diff(1)
- npm-owner(1)
- npm-install(1)
- npmrc(5)
- npm-uninstall(1)
- npm-hook(1)
- npm-unstar(1)
- npm-docs(1)
- pacote(1)
- npm-restart(1)
- npm-star(1)
- npm-link(1)
- npm-test(1)
- npm-token(1)
- npm-arborist(1)
- npm-profile(1)
- npm-team(1)
- npx(1)
- npm-stars(1)
- npm-adduser(1)
- npm-cache(1)
- npm-edit(1)
- npm-doctor(1)
- npm-help-search(1)
- arborist(1)
- npm-rebuild(1)
- npm-repo(1)
- npm-publish(1)
- npm-start(1)
- npm-unpublish(1)
- npm-dedupe(1)
- npm-init(1)
- npm-dist-tag(1)
- npm-login(1)
- npm-config(1)
- npm(1)
- npm-search(1)
- npm-version(1)
- npm-org(1)
- npm-shrinkwrap(1)
- npm-ls(1)
- package-json(5)
- npm-stop(1)
- npm-install-test(1)
- npm-completion(1)
- npm-run-script(1)
- npm-prune(1)
- npm-access(1)
- npm-ci(1)
- npm-audit(1)
- npm-find-dupes(1)
- npm-install-ci-test(1)
- package-lock-json(5)
- npm-fund(1)
- npm-explore(1)
- npm-pkg(1)
- node-pacote
- node-npmcli-mock-registry
- node-npmcli-node-gyp
- node-libnpmorg
- npm
- node-libnpmteam
- node-npmcli-promise-spawn
- node-libnpmdiff
- node-npmcli-run-script
- node-npmcli-metavuln-calculator
- node-npmcli-smoke-tests
- node-libnpmpublish
- node-qrcode-terminal
- node-npmcli-config
- node-npmcli-git
- node-libnpmaccess
- node-npm-packlist
- node-npmcli-disparity-colors
- node-libnpmexec
- node-npmcli-installed-package-contents
- node-libnpmpack
- node-npmcli-map-workspaces
- node-npmcli-query
- node-npmcli-arborist
- node-npmcli-package-json
- node-libnpmhook
- node-npmcli-name-from-folder
- node-libnpmversion
- node-libnpmfund
- node-libnpmsearch
apt-get install npm
Manual
NPM-DIST-TAG
NAMESynopsis
Description
Purpose
Caveats
Configuration
See Also
NAME
npm-dist-tag
Synopsis
<!-- AUTOGENERATED USAGE DESCRIPTIONS -->
Description
Add, remove, and enumerate distribution tags on a package:
|
• |
add: Tags the specified version of the package with the specified tag, |
or the
--tag
config if
not specified. If you have
two-factor authentication on auth-and-writes then
you’ll need to include a
one-time password on the command line with
--otp <one-time password>
, or at the OTP
prompt.
|
• |
rm: Clear a tag that is no longer in use from the package. If you have |
two-factor authentication on
auth-and-writes then you’ll need to include
a one-time password on the command line with
--otp
<one-time password>
,
or at the OTP prompt.
|
• |
ls: Show all of the dist-tags for a package, defaulting to the package in |
the current prefix. This is the default action if none is specified.
A tag can be
used when installing packages as a reference to a version
instead
of using a specific version number:
npm install <name>@<tag>
When installing dependencies, a preferred tagged version may be specified:
npm install --tag <tag>
(This also
applies to any other commands that resolve and install
dependencies, such as
npm dedupe
,
npm update
,
and
npm audit fix
.)
Publishing a
package sets the
latest
tag to the published version
unless the
--tag
option is used. For example,
npm publish
--tag=beta
.
By default,
npm install <pkg>
(without any
@<version>
or
@<tag>
specifier) installs the
latest
tag.
Purpose
Tags can be used to provide an alias instead of version numbers.
For example, a
project might choose to have multiple streams of development
and use a different tag for each stream, e.g.,
stable
,
beta
,
dev
,
canary
.
By default, the
latest
tag is used by npm to identify the current
version
of a package, and
npm install <pkg>
(without
any
@<version>
or
@<tag>
specifier) installs the
latest
tag. Typically,
projects only use the
latest
tag for stable release versions, and use other
tags for unstable
versions such as prereleases.
The next tag is used by some projects to identify the upcoming version.
Other than latest , no tag has any special significance to npm itself.
Caveats
This command
used to be known as
npm tag
, which only created new
tags,
and so had a different syntax.
Tags must share
a namespace with version numbers, because they are
specified in the same slot:
npm install
<pkg>@<version>
vs
npm install <pkg>@<tag>
.
Tags that can be
interpreted as valid semver ranges will be rejected. For
example,
v1.4
cannot be used as a tag, because it is
interpreted by
semver as
>=1.4.0 <1.5.0
. See
https://github.com/npm/npm/issues/6082
The simplest way
to avoid semver problems with tags is to use tags that do
not begin with a number or the letter
v
.
Configuration
<!-- AUTOGENERATED CONFIG DESCRIPTIONS -->
See Also
|
• |
package spec |
|||
|
• |
npm publish |
|||
|
• |
npm install |
|||
|
• |
npm dedupe |
|||
|
• |
npm registry |
|||
|
• |
npm config |
|||
|
• |
npmrc |