Supported Version Managers¶
nvb works with any of the following Node.js version managers. It auto-detects which one is available, or you can force one with NVB_MANAGER.
Auto-detection Order¶
When NVB_MANAGER is not set, nvb checks for managers in this order and uses the first one found:
- nvm
- fnm
- mise
- asdf
- n
Manager Details¶
nvm¶
- Detection: checks if
nvmshell function exists - Command:
nvm use <version> - Notes: nvm is a shell function, not a binary — this is why nvb uses the eval pattern
fnm¶
- Detection: checks if
fnmbinary is in$PATH - Command:
fnm use <version>
mise¶
- Detection: checks if
misebinary is in$PATH - Command:
eval "$(mise shell node@<version>)"
asdf¶
- Detection: checks if
asdfcommand is available - Command:
export ASDF_NODEJS_VERSION=<version> - Notes: uses environment variable override rather than
asdf shellfor better compatibility
n¶
- Detection: checks if
nbinary is in$PATH - Command:
n <version> - Notes:
nswitches the global Node version; it doesn't support per-shell versions
Forcing a Manager¶
This skips auto-detection and always uses the specified manager.