docs/dev-tools/backends/npm.md
You may install packages directly from npmjs.org even if there isn't an asdf plugin for it.
The code for this is inside of the mise repository at ./src/backend/npm.rs.
This relies on having npm installed for resolving package versions.
With the default npm.package_manager = "auto" setting, mise uses
aube for installing npm packages when it is installed,
similar to how the pipx backend uses uv when available.
If you use aube, bun, or pnpm as the package manager, that package manager
must also be installed.
When minimum_release_age is set, the npm backend
forwards that cutoff to transitive dependency resolution during install. This relies on the
configured package manager supporting its native release-age flag:
npm >= 11.10.0 using --min-release-age=<days>; npm 6.9.0–11.9.x using --before <timestamp> (sub-day minimum_release_age windows also use --before since --min-release-age is day-granular)aube using its minimumReleaseAge settingbun >= 1.3.0 using --minimum-release-age <seconds>pnpm >= 10.16.0 using --config.minimumReleaseAge=<minutes>If you want transitive protection, install and use a package manager version that meets the corresponding requirement above. Older versions may fail while processing the forwarded argument.
Here is how to install npm with mise:
mise use -g node
To install aube, bun, or pnpm:
mise use -g aube
# or
mise use -g bun
# or
mise use -g pnpm
The following installs the latest version of prettier and sets it as the active version on PATH:
$ mise use -g npm:prettier
$ prettier --version
3.1.0
The version will be set in ~/.config/mise/config.toml with the following format:
[tools]
"npm:prettier" = "latest"
Set these with mise settings set [VARIABLE] [VALUE] or by setting the environment variable listed.
The following tool-options are available for the npm backend—these
go in [tools] in mise.toml.
npm_argsAdditional arguments to pass to npm installs when settings.npm.package_manager = "npm".
pnpm_argsAdditional arguments to pass to pnpm installs when settings.npm.package_manager = "pnpm".
bun_argsAdditional arguments to pass to bun installs when settings.npm.package_manager = "bun".
aube_argsAdditional arguments to pass to aube add --global when
settings.npm.package_manager = "aube".
For example, to install npm with aube's append-only reporter mode:
[tools]
"npm:npm" = {
version = "latest",
aube_args = "--reporter append-only",
}