Skip to content

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.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 setting
  • bun >= 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:

sh
mise use -g node

To install aube, bun, or pnpm:

sh
mise use -g aube
# or
mise use -g bun
# or
mise use -g pnpm

Usage

The following installs the latest version of prettier and sets it as the active version on PATH:

sh
$ mise use -g npm:prettier
$ prettier --version
3.1.0

The version will be set in ~/.config/mise/config.toml with the following format:

toml
[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:
    • auto
    • npm
    • aube
    • bun
    • pnpm

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.

MIT LicenseCopyright © 2026en.dev