npm Backend
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.
Dependencies
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.0using--min-release-age=<days>;npm 6.9.0–11.9.xusing--before <timestamp>(sub-dayminimum_release_agewindows also use--beforesince--min-release-ageis day-granular)aubeusing itsminimumReleaseAgesettingbun >= 1.3.0using--minimum-release-age <seconds>pnpm >= 10.16.0using--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 nodeTo install aube, bun, or pnpm:
mise use -g aube
# or
mise use -g bun
# or
mise use -g pnpmUsage
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.0The version will be set in ~/.config/mise/config.toml with the following format:
[tools]
"npm:prettier" = "latest"Settings
Set these with mise settings set [VARIABLE] [VALUE] or by setting the environment variable listed.
npm.bundeprecated
- Type:
boolean - Env:
MISE_NPM_BUN - Default:
false - Deprecated: Use npm.package_manager instead.
If true, mise will use bun instead of npm if
bun is installed and on PATH.
This makes installing CLIs faster by using bun as the package manager.
You can install it with mise:
mise use -g bun
npm.package_manager
- Type:
string - Env:
MISE_NPM_PACKAGE_MANAGER - Default:
auto - Choices:
autonpmaubebunpnpm
Package manager to use for installing npm packages. The default, auto, uses
aube when it is installed and falls back to npm, similar to how the pipx
backend uses uv when available. Set this to npm, aube, bun, or pnpm
to force a specific package manager.