npm Backend experimental
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. You can install it with or without mise. Here is how to install npm
with mise:
sh
mise use -g node
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"